From vivek@in.ibm.com Fri May 5 10:36:20 2006 Date: Fri, 5 May 2006 13:36:06 -0400 From: Vivek Goyal To: linux kernel mailing list Cc: Greg KH , Morton Andrew Morton Subject: kconfigurable resources arch dependent changes arch/q-z Message-ID: <20060505173606.GH6450@in.ibm.com> Content-Disposition: inline o Changes to arch specific code for kconfigurable resources. This patch contains changes for arch/[q-z]* Signed-off-by: Vivek Goyal Signed-off-by: Greg Kroah-Hartman --- arch/s390/Kconfig | 8 ++++++++ arch/sh/Kconfig | 7 +++++++ arch/sh/boards/mpc1211/pci.c | 4 ++-- arch/sh/boards/overdrive/galileo.c | 2 +- arch/sh/drivers/pci/pci.c | 6 +++--- arch/sh64/kernel/pcibios.c | 4 ++-- arch/sparc/Kconfig | 7 +++++++ arch/sparc/kernel/pcic.c | 2 +- arch/sparc64/kernel/pci.c | 2 +- arch/v850/Kconfig | 7 +++++++ arch/v850/kernel/rte_mb_a_pci.c | 2 +- arch/xtensa/Kconfig | 7 +++++++ arch/xtensa/kernel/pci.c | 6 +++--- 13 files changed, 50 insertions(+), 14 deletions(-) --- gregkh-2.6.orig/arch/s390/Kconfig +++ gregkh-2.6/arch/s390/Kconfig @@ -218,6 +218,14 @@ config WARN_STACK_SIZE source "mm/Kconfig" +config RESOURCES_32BIT + bool "32 bit Memory and IO resources (EXPERIMENTAL)" + depends on EXPERIMENTAL + depends on !64BIT + help + By default resources are 64 bit. This option allows memory and IO + resources to be 32 bit to optimize code size. + comment "I/O subsystem configuration" config MACHCHK_WARNING --- gregkh-2.6.orig/arch/sh/Kconfig +++ gregkh-2.6/arch/sh/Kconfig @@ -532,6 +532,13 @@ config NODES_SHIFT default "1" depends on NEED_MULTIPLE_NODES +config RESOURCES_32BIT + bool "32 bit Memory and IO resources (EXPERIMENTAL)" + depends on EXPERIMENTAL + help + By default resources are 64 bit. This option allows memory and IO + resources to be 32 bit to optimize code size. + endmenu menu "Boot options" --- gregkh-2.6.orig/arch/sh/boards/mpc1211/pci.c +++ gregkh-2.6/arch/sh/boards/mpc1211/pci.c @@ -273,9 +273,9 @@ void __init pcibios_fixup_irqs(void) } void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + resource_size_t size, resource_size_t align) { - unsigned long start = res->start; + resource_size_t start = res->start; if (res->flags & IORESOURCE_IO) { if (start >= 0x10000UL) { --- gregkh-2.6.orig/arch/sh/boards/overdrive/galileo.c +++ gregkh-2.6/arch/sh/boards/overdrive/galileo.c @@ -536,7 +536,7 @@ void __init pcibios_fixup_bus(struct pci } void pcibios_align_resource(void *data, struct resource *res, - unsigned long size) + resource_size_t size) { } --- gregkh-2.6.orig/arch/sh/drivers/pci/pci.c +++ gregkh-2.6/arch/sh/drivers/pci/pci.c @@ -75,7 +75,7 @@ pcibios_update_resource(struct pci_dev * } void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + resource_size_t size, resource_size_t align) __attribute__ ((weak)); /* @@ -85,10 +85,10 @@ void pcibios_align_resource(void *data, * modulo 0x400. */ void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + resource_size_t size, resource_size_t align) { if (res->flags & IORESOURCE_IO) { - unsigned long start = res->start; + resource_size_t start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; --- gregkh-2.6.orig/arch/sh64/kernel/pcibios.c +++ gregkh-2.6/arch/sh64/kernel/pcibios.c @@ -69,10 +69,10 @@ pcibios_update_resource(struct pci_dev * * modulo 0x400. */ void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + resource_size_t size, resource_size_t align) { if (res->flags & IORESOURCE_IO) { - unsigned long start = res->start; + resource_size_t start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; --- gregkh-2.6.orig/arch/sparc/Kconfig +++ gregkh-2.6/arch/sparc/Kconfig @@ -67,6 +67,13 @@ config SPARC32 maintains both the SPARC32 and SPARC64 ports; its web page is available at . +config RESOURCES_32BIT + bool "32 bit Memory and IO resources (EXPERIMENTAL)" + depends on EXPERIMENTAL + help + By default resources are 64 bit. This option allows memory and IO + resources to be 32 bit to optimize code size. + # Global things across all Sun machines. config ISA bool --- gregkh-2.6.orig/arch/sparc/kernel/pcic.c +++ gregkh-2.6/arch/sparc/kernel/pcic.c @@ -859,7 +859,7 @@ char * __init pcibios_setup(char *str) } void pcibios_align_resource(void *data, struct resource *res, - u64 size, u64 align) + resource_size_t size, resource_size_t align) { } --- gregkh-2.6.orig/arch/sparc64/kernel/pci.c +++ gregkh-2.6/arch/sparc64/kernel/pci.c @@ -390,7 +390,7 @@ void pcibios_update_irq(struct pci_dev * } void pcibios_align_resource(void *data, struct resource *res, - unsigned long size, unsigned long align) + resource_size_t size, resource_size_t align) { } --- gregkh-2.6.orig/arch/v850/Kconfig +++ gregkh-2.6/arch/v850/Kconfig @@ -235,6 +235,13 @@ menu "Processor type and features" source "mm/Kconfig" +config RESOURCES_32BIT + bool "32 bit Memory and IO resources (EXPERIMENTAL)" + depends on EXPERIMENTAL + help + By default resources are 64 bit. This option allows memory and IO + resources to be 32 bit to optimize code size. + endmenu --- gregkh-2.6.orig/arch/v850/kernel/rte_mb_a_pci.c +++ gregkh-2.6/arch/v850/kernel/rte_mb_a_pci.c @@ -329,7 +329,7 @@ void pcibios_fixup_bus(struct pci_bus *b void pcibios_align_resource (void *data, struct resource *res, - unsigned long size, unsigned long align) + resource_size_t size, resource_size_t align) { } --- gregkh-2.6.orig/arch/xtensa/Kconfig +++ gregkh-2.6/arch/xtensa/Kconfig @@ -99,6 +99,13 @@ config MATH_EMULATION config HIGHMEM bool "High memory support" +config RESOURCES_32BIT + bool "32 bit Memory and IO resources (EXPERIMENTAL)" + depends on EXPERIMENTAL + help + By default resources are 64 bit. This option allows memory and IO + resources to be 32 bit to optimize code size. + endmenu menu "Platform options" --- gregkh-2.6.orig/arch/xtensa/kernel/pci.c +++ gregkh-2.6/arch/xtensa/kernel/pci.c @@ -71,13 +71,13 @@ static int pci_bus_count; * which might have be mirrored at 0x0100-0x03ff.. */ void -pcibios_align_resource(void *data, struct resource *res, unsigned long size, - unsigned long align) +pcibios_align_resource(void *data, struct resource *res, resource_size_t size, + resource_size_t align) { struct pci_dev *dev = data; if (res->flags & IORESOURCE_IO) { - unsigned long start = res->start; + resource_size_t start = res->start; if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large"