Commit 58a69c36 authored by Bernhard Walle's avatar Bernhard Walle Committed by Tony Luck

[IA64] 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: default avatarBernhard Walle <bwalle@suse.de>
Acked-by: default avatarJohn Keller <jpk@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 0bdfc190
...@@ -247,10 +247,18 @@ sn_io_slot_fixup(struct pci_dev *dev) ...@@ -247,10 +247,18 @@ sn_io_slot_fixup(struct pci_dev *dev)
addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
dev->resource[idx].start = addr; dev->resource[idx].start = addr;
dev->resource[idx].end = addr + size; dev->resource[idx].end = addr + size;
/*
* if it's already in the device structure, remove it before
* inserting
*/
if (dev->resource[idx].parent && dev->resource[idx].parent->child)
release_resource(&dev->resource[idx]);
if (dev->resource[idx].flags & IORESOURCE_IO) if (dev->resource[idx].flags & IORESOURCE_IO)
dev->resource[idx].parent = &ioport_resource; insert_resource(&ioport_resource, &dev->resource[idx]);
else else
dev->resource[idx].parent = &iomem_resource; insert_resource(&iomem_resource, &dev->resource[idx]);
/* If ROM, mark as shadowed in PROM */ /* If ROM, mark as shadowed in PROM */
if (idx == PCI_ROM_RESOURCE) if (idx == PCI_ROM_RESOURCE)
dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY; dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY;
......
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