]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PCI: Add legacy_io/mem to all busses
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 12 Nov 2008 03:38:53 +0000 (14:38 +1100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 7 Jan 2009 19:12:25 +0000 (11:12 -0800)
Currently, only PHBs get the legacy_* files, which makes it tricky for
userland to get access to the legacy space.  This commit exposes them in
every bus, since even child buses may forward legacy cycles if
configured properly.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/bus.c

index 999cc4088b5952beb76e018e573afff4b53fba04..3e1c135b174a2cf7aa7ac365e5c5dd99eb3055d5 100644 (file)
@@ -158,6 +158,10 @@ void pci_bus_add_devices(struct pci_bus *bus)
                                dev_err(&dev->dev,
                                        "Error creating cpulistaffinity"
                                        " file, continuing...\n");
+
+                       /* Create legacy_io and legacy_mem files for this bus */
+                       pci_create_legacy_files(child_bus);
+
                }
        }
 }