Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58a69c367c02a165004a5ce5dd55ce03b59ba43d
Commit:     58a69c367c02a165004a5ce5dd55ce03b59ba43d
Parent:     0bdfc1900705dadef6286d69de7da0feef841734
Author:     Bernhard Walle <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 14 19:07:47 2007 +0100
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Tue Mar 20 13:54:44 2007 -0700

    [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: Bernhard Walle <[EMAIL PROTECTED]>
    Acked-by: John Keller <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 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 600be3e..6b10e5d 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)
                addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
                dev->resource[idx].start = addr;
                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)
-                       dev->resource[idx].parent = &ioport_resource;
+                       insert_resource(&ioport_resource, &dev->resource[idx]);
                else
-                       dev->resource[idx].parent = &iomem_resource;
+                       insert_resource(&iomem_resource, &dev->resource[idx]);
                /* If ROM, mark as shadowed in PROM */
                if (idx == PCI_ROM_RESOURCE)
                        dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to