Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (67 commits)
  [SCSI] SUNESP: Complete driver rewrite to version 2.0
  [SPARC64]: Convert PCI over to generic struct iommu/strbuf.
  [SPARC]: device_node name constification fallout
  [SPARC64]: Convert SBUS over to generic iommu/strbuf structs.
  [SPARC64]: Add generic iommu and strbuf structs to iommu.h
  [SPARC64]: Consolidate {sbus,pci}_iommu_arena.
  [SPARC]: Make device_node name and type const
  [SPARC64]: constify some paramaters of OF routines
  [TIGON3]: of_get_property() returns const.
  [SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
  [SPARC64]: Document and fix calculation of pages_avail.
  [SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c
  [SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn().
  [SPARC64]: Add proper header file extern for cmdline_memory_size.
  [SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()
  [SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c
  [SPARC64]: Give move verbose show_mem() output just like i386.
  [SPARC64]: Mark show_mem() printk's with KERN_INFO.
  [SPARC64]: Kill kvaddr_to_phys() and friends.
  [SPARC64]: Privatize sun4u_get_pte() and fix name.
  ...
  • Loading branch information
Linus Torvalds committed Apr 27, 2007
2 parents 15c5403 + cd9ad58 commit 0278ef8
Show file tree
Hide file tree
Showing 94 changed files with 5,648 additions and 8,101 deletions.
1 change: 0 additions & 1 deletion arch/alpha/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
$(ev6-y)csum_ipv6_magic.o \
$(ev6-y)clear_page.o \
$(ev6-y)copy_page.o \
strcasecmp.o \
fpreg.o \
callback_srm.o srm_puts.o srm_printk.o

Expand Down
26 changes: 0 additions & 26 deletions arch/alpha/lib/strcasecmp.c

This file was deleted.

2 changes: 0 additions & 2 deletions arch/powerpc/kernel/ppc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strcasecmp);
EXPORT_SYMBOL(strncasecmp);

EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic);
Expand Down
5 changes: 2 additions & 3 deletions arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ EXTRA_CFLAGS += -mno-minimal-toc
endif

ifeq ($(CONFIG_PPC_MERGE),y)
obj-y := string.o strcase.o
obj-y := string.o
obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
endif

obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
memcpy_64.o usercopy_64.o mem_64.o string.o \
strcase.o
memcpy_64.o usercopy_64.o mem_64.o string.o
obj-$(CONFIG_QUICC_ENGINE) += rheap.o
obj-$(CONFIG_XMON) += sstep.o
obj-$(CONFIG_KPROBES) += sstep.o
Expand Down
25 changes: 0 additions & 25 deletions arch/powerpc/lib/strcase.c

This file was deleted.

2 changes: 0 additions & 2 deletions arch/ppc/kernel/ppc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strcasecmp);
EXPORT_SYMBOL(strncasecmp);
EXPORT_SYMBOL(__div64_32);

EXPORT_SYMBOL(csum_partial);
Expand Down
2 changes: 1 addition & 1 deletion arch/ppc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for ppc-specific library files..
#

obj-y := checksum.o string.o strcase.o div64.o
obj-y := checksum.o string.o div64.o

obj-$(CONFIG_8xx) += rheap.o
obj-$(CONFIG_CPM2) += rheap.o
24 changes: 0 additions & 24 deletions arch/ppc/lib/strcase.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/sh/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

lib-y = delay.o memset.o memmove.o memchr.o \
checksum.o strcasecmp.o strlen.o div64.o udivdi3.o \
checksum.o strlen.o div64.o udivdi3.o \
div64-generic.o

memcpy-y := memcpy.o
Expand Down
26 changes: 0 additions & 26 deletions arch/sh/lib/strcasecmp.c

This file was deleted.

14 changes: 7 additions & 7 deletions arch/sparc/kernel/ebus.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
struct linux_ebus *ebus_chain = NULL;

/* We are together with pcic.c under CONFIG_PCI. */
extern unsigned int pcic_pin_to_irq(unsigned int, char *name);
extern unsigned int pcic_pin_to_irq(unsigned int, const char *name);

/*
* IRQ Blacklist
Expand Down Expand Up @@ -69,7 +69,7 @@ static inline unsigned long ebus_alloc(size_t size)

/*
*/
int __init ebus_blacklist_irq(char *name)
int __init ebus_blacklist_irq(const char *name)
{
struct ebus_device_irq *dp;

Expand All @@ -86,8 +86,8 @@ int __init ebus_blacklist_irq(char *name)
void __init fill_ebus_child(struct device_node *dp,
struct linux_ebus_child *dev)
{
int *regs;
int *irqs;
const int *regs;
const int *irqs;
int i, len;

dev->prom_node = dp;
Expand Down Expand Up @@ -146,9 +146,9 @@ void __init fill_ebus_child(struct device_node *dp,

void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev)
{
struct linux_prom_registers *regs;
const struct linux_prom_registers *regs;
struct linux_ebus_child *child;
int *irqs;
const int *irqs;
int i, n, len;
unsigned long baseaddr;

Expand Down Expand Up @@ -269,7 +269,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d

void __init ebus_init(void)
{
struct linux_prom_pci_registers *regs;
const struct linux_prom_pci_registers *regs;
struct linux_pbm_info *pbm;
struct linux_ebus_device *dev;
struct linux_ebus *ebus;
Expand Down
21 changes: 11 additions & 10 deletions arch/sparc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct of_bus {
int *addrc, int *sizec);
int (*map)(u32 *addr, const u32 *range,
int na, int ns, int pna);
unsigned int (*get_flags)(u32 *addr);
unsigned int (*get_flags)(const u32 *addr);
};

/*
Expand Down Expand Up @@ -270,7 +270,7 @@ static int of_bus_default_map(u32 *addr, const u32 *range,
return 0;
}

static unsigned int of_bus_default_get_flags(u32 *addr)
static unsigned int of_bus_default_get_flags(const u32 *addr)
{
return IORESOURCE_MEM;
}
Expand Down Expand Up @@ -334,7 +334,7 @@ static int of_bus_pci_map(u32 *addr, const u32 *range,
return 0;
}

static unsigned int of_bus_pci_get_flags(u32 *addr)
static unsigned int of_bus_pci_get_flags(const u32 *addr)
{
unsigned int flags = 0;
u32 w = addr[0];
Expand Down Expand Up @@ -375,7 +375,7 @@ static int of_bus_sbus_map(u32 *addr, const u32 *range, int na, int ns, int pna)
return of_bus_default_map(addr, range, na, ns, pna);
}

static unsigned int of_bus_sbus_get_flags(u32 *addr)
static unsigned int of_bus_sbus_get_flags(const u32 *addr)
{
return IORESOURCE_MEM;
}
Expand Down Expand Up @@ -432,7 +432,7 @@ static int __init build_one_resource(struct device_node *parent,
u32 *addr,
int na, int ns, int pna)
{
u32 *ranges;
const u32 *ranges;
unsigned int rlen;
int rone;

Expand Down Expand Up @@ -470,7 +470,7 @@ static void __init build_device_resources(struct of_device *op,
struct of_bus *bus;
int na, ns;
int index, num_reg;
void *preg;
const void *preg;

if (!parent)
return;
Expand All @@ -492,7 +492,7 @@ static void __init build_device_resources(struct of_device *op,
for (index = 0; index < num_reg; index++) {
struct resource *r = &op->resource[index];
u32 addr[OF_MAX_ADDR_CELLS];
u32 *reg = (preg + (index * ((na + ns) * 4)));
const u32 *reg = (preg + (index * ((na + ns) * 4)));
struct device_node *dp = op->node;
struct device_node *pp = p_op->node;
struct of_bus *pbus, *dbus;
Expand Down Expand Up @@ -559,7 +559,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
struct device *parent)
{
struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
struct linux_prom_irqs *intr;
const struct linux_prom_irqs *intr;
int len, i;

if (!op)
Expand All @@ -579,7 +579,8 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
for (i = 0; i < op->num_irqs; i++)
op->irqs[i] = intr[i].pri;
} else {
unsigned int *irq = of_get_property(dp, "interrupts", &len);
const unsigned int *irq =
of_get_property(dp, "interrupts", &len);

if (irq) {
op->num_irqs = len / sizeof(unsigned int);
Expand All @@ -594,7 +595,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
0, 0, 1, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 0,
};
struct device_node *io_unit, *sbi = dp->parent;
struct linux_prom_registers *regs;
const struct linux_prom_registers *regs;
int board, slot;

while (sbi) {
Expand Down
4 changes: 1 addition & 3 deletions arch/sparc/kernel/pcic.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include <asm/irq_regs.h>


unsigned int pcic_pin_to_irq(unsigned int pin, char *name);

/*
* I studied different documents and many live PROMs both from 2.30
* family and 3.xx versions. I came to the amazing conclusion: there is
Expand Down Expand Up @@ -681,7 +679,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
* pcic_pin_to_irq() is exported to ebus.c.
*/
unsigned int
pcic_pin_to_irq(unsigned int pin, char *name)
pcic_pin_to_irq(unsigned int pin, const char *name)
{
struct linux_pcic *pcic = &pcic0;
unsigned int irq;
Expand Down
19 changes: 11 additions & 8 deletions arch/sparc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ static struct device_node *allnodes;
*/
static DEFINE_RWLOCK(devtree_lock);

int of_device_is_compatible(struct device_node *device, const char *compat)
int of_device_is_compatible(const struct device_node *device,
const char *compat)
{
const char* cp;
int cplen, l;

cp = (char *) of_get_property(device, "compatible", &cplen);
cp = of_get_property(device, "compatible", &cplen);
if (cp == NULL)
return 0;
while (cplen > 0) {
Expand Down Expand Up @@ -150,13 +151,14 @@ struct device_node *of_find_compatible_node(struct device_node *from,
}
EXPORT_SYMBOL(of_find_compatible_node);

struct property *of_find_property(struct device_node *np, const char *name,
struct property *of_find_property(const struct device_node *np,
const char *name,
int *lenp)
{
struct property *pp;

for (pp = np->properties; pp != 0; pp = pp->next) {
if (strcmp(pp->name, name) == 0) {
if (strcasecmp(pp->name, name) == 0) {
if (lenp != 0)
*lenp = pp->length;
break;
Expand All @@ -170,7 +172,8 @@ EXPORT_SYMBOL(of_find_property);
* Find a property with a given name for a given node
* and return the value.
*/
void *of_get_property(struct device_node *np, const char *name, int *lenp)
const void *of_get_property(const struct device_node *np, const char *name,
int *lenp)
{
struct property *pp = of_find_property(np,name,lenp);
return pp ? pp->value : NULL;
Expand All @@ -192,7 +195,7 @@ EXPORT_SYMBOL(of_getintprop_default);

int of_n_addr_cells(struct device_node *np)
{
int* ip;
const int* ip;
do {
if (np->parent)
np = np->parent;
Expand All @@ -207,7 +210,7 @@ EXPORT_SYMBOL(of_n_addr_cells);

int of_n_size_cells(struct device_node *np)
{
int* ip;
const int* ip;
do {
if (np->parent)
np = np->parent;
Expand Down Expand Up @@ -239,7 +242,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
while (*prevp) {
struct property *prop = *prevp;

if (!strcmp(prop->name, name)) {
if (!strcasecmp(prop->name, name)) {
void *old_val = prop->value;
int ret;

Expand Down
Loading

0 comments on commit 0278ef8

Please sign in to comment.