iomem ends at ~0UL, not 0xffffffff
Subsystems (2)
PATCH 1/1 iomem ends at ~0UL, not 0xffffffff
Every 64-bit architecture changes the end of iomem_resources. Some more gracefully than others. This patch does away with all that by making it end at ~0UL by default.
arch/alpha/kernel/core_marvel.c | 1 - arch/alpha/kernel/core_mcpcia.c | 1 - arch/alpha/kernel/core_titan.c | 1 - arch/alpha/kernel/core_tsunami.c | 1 - arch/alpha/kernel/core_wildfire.c | 1 - arch/ia64/sn/io/pci_bus_cvlink.c | 6 ------ arch/ia64/sn/io/sn2/pci_bus_cvlink.c | 6 ------ arch/mips64/sgi-ip27/ip27-pci.c | 1 - arch/parisc/mm/init.c | 5 ----- arch/sparc64/kernel/devices.c | 1 - kernel/resource.c | 2 +- 11 files changed, 1 insertion(+), 25 deletions(-)
arch/alpha/kernel/core_marvel.c +0 -1
@@ -452,7 +452,6 @@ marvel_init_arch(void)/* With multiple PCI busses, we play with I/O as physical addrs. */ ioport_resource.end = ~0UL ; - iomem_resource.end = ~0UL ;/* PCI DMA Direct Mapping is 1GB at 2GB. */ __direct_map_base =0x80000000 ;
arch/alpha/kernel/core_mcpcia.c +0 -1
@@ -407,7 +407,6 @@ mcpcia_init_arch(void) {/* With multiple PCI busses, we play with I/O as physical addrs. */ ioport_resource.end = ~0UL ; - iomem_resource.end = ~0UL ;/* Allocate hose 0. That's the one that all the ISA junk hangs off of, from which we'll be registering stuff here in a bit.
arch/alpha/kernel/core_titan.c +0 -1
@@ -412,7 +412,6 @@ titan_init_arch(void)/* With multiple PCI busses, we play with I/O as physical addrs. */ ioport_resource.end = ~0UL ; - iomem_resource.end = ~0UL ;/* PCI DMA Direct Mapping is 1GB at 2GB. */ __direct_map_base =0x80000000 ;
arch/alpha/kernel/core_tsunami.c +0 -1
@@ -390,7 +390,6 @@ tsunami_init_arch(void)#endif /* With multiple PCI busses, we play with I/O as physical addrs. */ ioport_resource.end = ~0UL ; - iomem_resource.end = ~0UL ;/* Find how many hoses we have, and initialize them. TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10). */
arch/alpha/kernel/core_wildfire.c +0 -1
@@ -309,7 +309,6 @@ wildfire_init_arch(void)/* With multiple PCI buses, we play with I/O as physical addrs. */ ioport_resource.end = ~0UL ; - iomem_resource.end = ~0UL ;/* Probe the hardware for info about configuration. */
arch/ia64/sn/io/pci_bus_cvlink.c +0 -6
@@ -373,12 +373,6 @@ sn1_pci_fixup(int arg)#endif /* -* Set the root start and end for Mem Resource. -*/ - iomem_resource.start =0 ; - iomem_resource.end =0xffffffffffffffff ; - -/* * Initialize the device vertex in the pci_dev struct. */ pci_for_each_dev (device_dev) {
arch/ia64/sn/io/sn2/pci_bus_cvlink.c +0 -6
@@ -323,12 +323,6 @@ sn_pci_fixup(int arg) ioport_resource.end =0xcfffffffffffffff ;/* -* Set the root start and end for Mem Resource. -*/ - iomem_resource.start =0 ; - iomem_resource.end =0xffffffffffffffff ; - -/* * Initialize the device vertex in the pci_dev struct. */ pci_for_each_dev (device_dev) {
arch/mips64/sgi-ip27/ip27-pci.c +0 -1
@@ -149,7 +149,6 @@ void __init pcibios_init(void)int i; ioport_resource.end = ~0UL ; - iomem_resource.end = ~0UL ;for (i=0 ; i<num_bridges; i++) {printk ("PCI: Probing PCI hardware on host bus %2d.\n" , i);
arch/parisc/mm/init.c +0 -5
@@ -195,11 +195,6 @@ static void __init setup_bootmem(void)#endif /* __LP64__ */ -#if 1 -/* KLUGE! this really belongs in kernel/resource.c! */ - iomem_resource.end = ~0UL ; -#endif - sysram_resource_count = npmem_ranges;for (i =0 ; i < sysram_resource_count; i++) {struct resource *res = &sysram_resources[i];
arch/sparc64/kernel/devices.c +0 -1
@@ -40,7 +40,6 @@ void __init device_scan(void)/* FIX ME FAST... -DaveM */ ioport_resource.end =0xffffffffffffffffUL ; - iomem_resource.end =0xffffffffffffffffUL ;prom_getstring (prom_root_node,"device_type" , node_str,sizeof (node_str));
kernel/resource.c +1 -1
@@ -21,7 +21,7 @@struct resource ioport_resource = {"PCI IO" ,0x0000 ,IO_SPACE_LIMIT ,IORESOURCE_IO }; -struct resource iomem_resource = {"PCI mem" ,0x00000000 ,0xffffffff ,IORESOURCE_MEM }; +struct resource iomem_resource = {"PCI mem" ,0UL , ~0UL ,IORESOURCE_MEM };static rwlock_t resource_lock =RW_LOCK_UNLOCKED ;
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk