Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40879
b: refs/heads/master
c: d027c4d
h: refs/heads/master
i:
  40877: 6bd5e20
  40875: 90e49dd
  40871: 62f8080
  40863: b36c223
v: v3
  • Loading branch information
Alexey Dobriyan authored and Mauro Carvalho Chehab committed Nov 13, 2006
1 parent 16001f0 commit 3f0ab0d
Show file tree
Hide file tree
Showing 54 changed files with 217 additions and 444 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 239fd45938f9ddf64f120e0260c7b76eb73bd5a7
refs/heads/master: d027c4dc7d6e35a4e43dbcc178f0bf3359814306
1 change: 0 additions & 1 deletion trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# Top-level generic files
#
tags
TAGS
vmlinux*
System.map
Module.symvers
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,6 @@ source "net/Kconfig"

source "drivers/Kconfig"

config MSPEC
tristate "Memory special operations driver"
depends on IA64
select IA64_UNCACHED_ALLOCATOR
help
If you have an ia64 and you want to enable memory special
operations support (formerly known as fetchop), say Y here,
otherwise say N.

source "fs/Kconfig"

source "lib/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ config ARCH_SPARSEMEM_ENABLE

config ARCH_SPARSEMEM_DEFAULT
def_bool y
depends on (SMP && PPC_PSERIES) || PPC_CELL
depends on SMP && PPC_PSERIES

config ARCH_POPULATES_NODE_MAP
def_bool y
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/boot/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ if [ -z "$cacheit" ]; then
fi

if [ -n "$initrd" ]; then
addsec $tmp "$initrd" $isection
addsec $tmp "$initrd" initrd
fi

if [ -n "$dtb" ]; then
addsec $tmp "$dtb" .kernel:dtb
addsec $tmp "$dtb" dtb
fi

if [ "$platform" != "miboot" ]; then
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/powerpc/boot/zImage.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ SECTIONS
__got2_end = .;
}

. = ALIGN(8);
_dtb_start = .;
.kernel:dtb : { *(.kernel:dtb) }
_dtb_end = .;

. = ALIGN(4096);
_vmlinux_start = .;
.kernel:vmlinux.strip : { *(.kernel:vmlinux.strip) }
Expand Down
47 changes: 10 additions & 37 deletions trunk/arch/powerpc/kernel/rtas_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@
#define VALIDATE_BUF_SIZE 4096
#define RTAS_MSG_MAXLEN 64

/* Quirk - RTAS requires 4k list length and block size */
#define RTAS_BLKLIST_LENGTH 4096
#define RTAS_BLK_SIZE 4096

struct flash_block {
char *data;
unsigned long length;
Expand All @@ -87,7 +83,7 @@ struct flash_block {
* into a version/length and translate the pointers
* to absolute.
*/
#define FLASH_BLOCKS_PER_NODE ((RTAS_BLKLIST_LENGTH - 16) / sizeof(struct flash_block))
#define FLASH_BLOCKS_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct flash_block))
struct flash_block_list {
unsigned long num_blocks;
struct flash_block_list *next;
Expand All @@ -100,9 +96,6 @@ struct flash_block_list_header { /* just the header of flash_block_list */

static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};

/* Use slab cache to guarantee 4k alignment */
static kmem_cache_t *flash_block_cache = NULL;

#define FLASH_BLOCK_LIST_VERSION (1UL)

/* Local copy of the flash block list.
Expand Down Expand Up @@ -160,7 +153,7 @@ static int flash_list_valid(struct flash_block_list *flist)
return FLASH_IMG_NULL_DATA;
}
block_size = f->blocks[i].length;
if (block_size <= 0 || block_size > RTAS_BLK_SIZE) {
if (block_size <= 0 || block_size > PAGE_SIZE) {
return FLASH_IMG_BAD_LEN;
}
image_size += block_size;
Expand All @@ -184,9 +177,9 @@ static void free_flash_list(struct flash_block_list *f)

while (f) {
for (i = 0; i < f->num_blocks; i++)
kmem_cache_free(flash_block_cache, f->blocks[i].data);
free_page((unsigned long)(f->blocks[i].data));
next = f->next;
kmem_cache_free(flash_block_cache, f);
free_page((unsigned long)f);
f = next;
}
}
Expand Down Expand Up @@ -285,12 +278,6 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf,
return msglen;
}

/* constructor for flash_block_cache */
void rtas_block_ctor(void *ptr, kmem_cache_t *cache, unsigned long flags)
{
memset(ptr, 0, RTAS_BLK_SIZE);
}

/* We could be much more efficient here. But to keep this function
* simple we allocate a page to the block list no matter how small the
* count is. If the system is low on memory it will be just as well
Expand All @@ -315,7 +302,7 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
* proc file
*/
if (uf->flist == NULL) {
uf->flist = kmem_cache_alloc(flash_block_cache, GFP_KERNEL);
uf->flist = (struct flash_block_list *) get_zeroed_page(GFP_KERNEL);
if (!uf->flist)
return -ENOMEM;
}
Expand All @@ -326,21 +313,21 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
next_free = fl->num_blocks;
if (next_free == FLASH_BLOCKS_PER_NODE) {
/* Need to allocate another block_list */
fl->next = kmem_cache_alloc(flash_block_cache, GFP_KERNEL);
fl->next = (struct flash_block_list *)get_zeroed_page(GFP_KERNEL);
if (!fl->next)
return -ENOMEM;
fl = fl->next;
next_free = 0;
}

if (count > RTAS_BLK_SIZE)
count = RTAS_BLK_SIZE;
p = kmem_cache_alloc(flash_block_cache, GFP_KERNEL);
if (count > PAGE_SIZE)
count = PAGE_SIZE;
p = (char *)get_zeroed_page(GFP_KERNEL);
if (!p)
return -ENOMEM;

if(copy_from_user(p, buffer, count)) {
kmem_cache_free(flash_block_cache, p);
free_page((unsigned long)p);
return -EFAULT;
}
fl->blocks[next_free].data = p;
Expand Down Expand Up @@ -804,16 +791,6 @@ int __init rtas_flash_init(void)
goto cleanup;

rtas_flash_term_hook = rtas_flash_firmware;

flash_block_cache = kmem_cache_create("rtas_flash_cache",
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
rtas_block_ctor, NULL);
if (!flash_block_cache) {
printk(KERN_ERR "%s: failed to create block cache\n",
__FUNCTION__);
rc = -ENOMEM;
goto cleanup;
}
return 0;

cleanup:
Expand All @@ -828,10 +805,6 @@ int __init rtas_flash_init(void)
void __exit rtas_flash_cleanup(void)
{
rtas_flash_term_hook = NULL;

if (flash_block_cache)
kmem_cache_destroy(flash_block_cache);

remove_flash_pde(firmware_flash_pde);
remove_flash_pde(firmware_update_pde);
remove_flash_pde(validate_pde);
Expand Down
41 changes: 8 additions & 33 deletions trunk/arch/powerpc/platforms/cell/spu_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,19 +655,14 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)

for (i=0; i < 3; i++) {
ret = of_irq_map_one(np, i, &oirq);
if (ret) {
pr_debug("spu_new: failed to get irq %d\n", i);
if (ret)
goto err;
}

ret = -EINVAL;
pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0],
oirq.controller->full_name);
spu->irqs[i] = irq_create_of_mapping(oirq.controller,
oirq.specifier, oirq.size);
if (spu->irqs[i] == NO_IRQ) {
pr_debug("spu_new: failed to map it !\n");
if (spu->irqs[i] == NO_IRQ)
goto err;
}
}
return 0;

Expand All @@ -686,7 +681,7 @@ static int spu_map_resource(struct device_node *node, int nr,
struct resource resource = { };
int ret;

ret = of_address_to_resource(node, nr, &resource);
ret = of_address_to_resource(node, 0, &resource);
if (ret)
goto out;

Expand All @@ -709,42 +704,22 @@ static int __init spu_map_device(struct spu *spu, struct device_node *node)

ret = spu_map_resource(node, 0, (void __iomem**)&spu->local_store,
&spu->local_store_phys);
if (ret) {
pr_debug("spu_new: failed to map %s resource 0\n",
node->full_name);
if (ret)
goto out;
}
ret = spu_map_resource(node, 1, (void __iomem**)&spu->problem,
&spu->problem_phys);
if (ret) {
pr_debug("spu_new: failed to map %s resource 1\n",
node->full_name);
if (ret)
goto out_unmap;
}
ret = spu_map_resource(node, 2, (void __iomem**)&spu->priv2,
NULL);
if (ret) {
pr_debug("spu_new: failed to map %s resource 2\n",
node->full_name);
if (ret)
goto out_unmap;
}

if (!firmware_has_feature(FW_FEATURE_LPAR))
ret = spu_map_resource(node, 3, (void __iomem**)&spu->priv1,
NULL);
if (ret) {
pr_debug("spu_new: failed to map %s resource 3\n",
node->full_name);
if (ret)
goto out_unmap;
}
pr_debug("spu_new: %s maps:\n", node->full_name);
pr_debug(" local store : 0x%016lx -> 0x%p\n",
spu->local_store_phys, spu->local_store);
pr_debug(" problem state : 0x%016lx -> 0x%p\n",
spu->problem_phys, spu->problem);
pr_debug(" priv2 : 0x%p\n", spu->priv2);
pr_debug(" priv1 : 0x%p\n", spu->priv1);

return 0;

out_unmap:
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,14 @@ config SGI_MBCS
If you have an SGI Altix with an attached SABrick
say Y or M here, otherwise say N.

config MSPEC
tristate "Memory special operations driver"
depends on IA64
help
If you have an ia64 and you want to enable memory special
operations support (formerly known as fetchop), say Y here,
otherwise say N.

source "drivers/serial/Kconfig"

config UNIX98_PTYS
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ static ssize_t provides_dev_sdrs_show(struct device *dev,
struct bmc_device *bmc = dev_get_drvdata(dev);

return snprintf(buf, 10, "%u\n",
(bmc->id.device_revision & 0x80) >> 7);
bmc->id.device_revision && 0x80 >> 7);
}

static ssize_t revision_show(struct device *dev, struct device_attribute *attr,
Expand All @@ -1863,7 +1863,7 @@ static ssize_t revision_show(struct device *dev, struct device_attribute *attr,
struct bmc_device *bmc = dev_get_drvdata(dev);

return snprintf(buf, 20, "%u\n",
bmc->id.device_revision & 0x0F);
bmc->id.device_revision && 0x0F);
}

static ssize_t firmware_rev_show(struct device *dev,
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/char/mspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ enum {
MSPEC_UNCACHED
};

#ifdef CONFIG_SGI_SN
static int is_sn2;
#else
#define is_sn2 0
#endif

/*
* One of these structures is allocated when an mspec region is mmaped. The
Expand Down Expand Up @@ -215,7 +211,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address)
if (vdata->type == MSPEC_FETCHOP)
paddr = TO_AMO(maddr);
else
paddr = maddr & ~__IA64_UNCACHED_OFFSET;
paddr = __pa(TO_CAC(maddr));

pfn = paddr >> PAGE_SHIFT;

Expand Down Expand Up @@ -339,7 +335,6 @@ mspec_init(void)
* The fetchop device only works on SN2 hardware, uncached and cached
* memory drivers should both be valid on all ia64 hardware
*/
#ifdef CONFIG_SGI_SN
if (ia64_platform_is("sn2")) {
is_sn2 = 1;
if (is_shub2()) {
Expand Down Expand Up @@ -368,7 +363,6 @@ mspec_init(void)
goto free_scratch_pages;
}
}
#endif
ret = misc_register(&cached_miscdev);
if (ret) {
printk(KERN_ERR "%s: failed to register device %i\n",
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/frontends/tda826x.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static struct dvb_tuner_ops tda826x_tuner_ops = {
.info = {
.name = "Philips TDA826X",
.frequency_min = 950000,
.frequency_min = 2175000
.frequency_max = 2175000
},
.release = tda826x_release,
.sleep = tda826x_sleep,
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/net/arcnet/com20020.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,13 @@ static void com20020_set_mc_list(struct net_device *dev)
}
}

#if defined(CONFIG_ARCNET_COM20020_PCI_MODULE) || \
defined(CONFIG_ARCNET_COM20020_ISA_MODULE)
#ifdef MODULE

EXPORT_SYMBOL(com20020_check);
EXPORT_SYMBOL(com20020_found);
#endif

MODULE_LICENSE("GPL");

#ifdef MODULE

int init_module(void)
{
BUGLVL(D_NORMAL) printk(VERSION);
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4692,8 +4692,6 @@ static int bond_check_params(struct bond_params *params)
return 0;
}

static struct lock_class_key bonding_netdev_xmit_lock_key;

/* Create a new bond based on the specified name and bonding parameters.
* Caller must NOT hold rtnl_lock; we need to release it here before we
* set up our sysfs entries.
Expand Down Expand Up @@ -4729,9 +4727,6 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
if (res < 0) {
goto out_bond;
}

lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key);

if (newbond)
*newbond = bond_dev->priv;

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/cris/eth_v10.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,6 @@ etrax_ethernet_init(void)
* does not share cacheline with any other data (to avoid cache bug)
*/
RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES);
if (!RxDescList[i].skb)
return -ENOMEM;
RxDescList[i].descr.ctrl = 0;
RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE;
RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]);
Expand Down
Loading

0 comments on commit 3f0ab0d

Please sign in to comment.