diff options
author | Bernhard Walle <bwalle@suse.de> | 2007-03-18 05:26:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-18 14:35:07 -0400 |
commit | 647157255915b76ddfbea87ca396ace364d158c5 (patch) | |
tree | e248f2e89ccb8526b615214db06c4868cdd8d589 /arch/ia64 | |
parent | 4f78bb289f4ca57b93385b4df4d0defe5804588b (diff) |
[PATCH] Fix wrong /proc/iomem on SGI Altix
In sn_io_slot_fixup(), the parent is re-set from the bus to
io(port|mem)_resource because the address is changed in a way that it's not
child of the bus any more.
However, only the root is set but not the parent/child/sibling relationship
in the resource tree which causes 'cat /proc/iomem' to stop after this
memory area. Depding on the poition in the tree the iomem may be nearly
completely empty.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: John Keller <jpk@sgi.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 600be3ebae0..6b10e5d2848 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -247,10 +247,18 @@ sn_io_slot_fixup(struct pci_dev *dev) | |||
247 | addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; | 247 | addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; |
248 | dev->resource[idx].start = addr; | 248 | dev->resource[idx].start = addr; |
249 | dev->resource[idx].end = addr + size; | 249 | dev->resource[idx].end = addr + size; |
250 | |||
251 | /* | ||
252 | * if it's already in the device structure, remove it before | ||
253 | * inserting | ||
254 | */ | ||
255 | if (dev->resource[idx].parent && dev->resource[idx].parent->child) | ||
256 | release_resource(&dev->resource[idx]); | ||
257 | |||
250 | if (dev->resource[idx].flags & IORESOURCE_IO) | 258 | if (dev->resource[idx].flags & IORESOURCE_IO) |
251 | dev->resource[idx].parent = &ioport_resource; | 259 | insert_resource(&ioport_resource, &dev->resource[idx]); |
252 | else | 260 | else |
253 | dev->resource[idx].parent = &iomem_resource; | 261 | insert_resource(&iomem_resource, &dev->resource[idx]); |
254 | /* If ROM, mark as shadowed in PROM */ | 262 | /* If ROM, mark as shadowed in PROM */ |
255 | if (idx == PCI_ROM_RESOURCE) | 263 | if (idx == PCI_ROM_RESOURCE) |
256 | dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY; | 264 | dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY; |