Commit 1c2b19ec authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] fix iomem_resource

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.
parent c8196e3c
......@@ -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;
......
......@@ -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.
......
......@@ -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;
......
......@@ -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). */
......
......@@ -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. */
......
......@@ -372,12 +372,6 @@ sn1_pci_fixup(int arg)
#endif
#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.
*/
......
......@@ -322,12 +322,6 @@ sn_pci_fixup(int arg)
ioport_resource.start = 0xc000000000000000;
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.
*/
......
......@@ -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);
......
......@@ -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];
......
......@@ -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));
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment