]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ppc64: fix PCI IO mapping
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Nov 2005 04:04:24 +0000 (15:04 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 04:32:37 +0000 (15:32 +1100)
phbs_remap_io(), which maps the PCI IO space into the kernel virtual space,
is called too early on powermac, and thus doesn't work.

This fixes it by removing the call from all platforms and putting it back
into the ppc64 common code where it belongs, after the actual probing of
the bus.

That means that before that call, only the ISA IO space (if any) is mapped,
any PIO access (from quirks for example) will fail. This happens not to be
a problem for now, but we'll have to rework that code if it becomes one in
the future.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/maple/pci.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/pseries/pci.c
arch/ppc64/kernel/pci.c

index 340c21caeae24cc03b1a12df50bda25a3fe9bc4a..895aeb3f75d0d73b6ddf94b370eaec93be0be604 100644 (file)
@@ -380,9 +380,6 @@ void __init maple_pcibios_fixup(void)
        for_each_pci_dev(dev)
                pci_read_irq_line(dev);
 
-       /* Do the mapping of the IO space */
-       phbs_remap_io();
-
        DBG(" <- maple_pcibios_fixup\n");
 }
 
index 8f818d092e2bbe20566cf0b049c98f086979651f..dfd41b9781a9a9df37dbeac71d3c8d18e5510404 100644 (file)
@@ -918,9 +918,6 @@ void __init pmac_pci_init(void)
                        PCI_DN(np)->busno = 0xf0;
        }
 
-       /* map in PCI I/O space */
-       phbs_remap_io();
-
        /* pmac_check_ht_link(); */
 
        /* Tell pci.c to not use the common resource allocation mechanism */
index 6b0772f3569266b0e0f43bfc5ce4520270ea637b..999a9620b5ce0f13f89cc08a8d75895ca46cad97 100644 (file)
@@ -107,7 +107,6 @@ static void __init pSeries_request_regions(void)
 
 void __init pSeries_final_fixup(void)
 {
-       phbs_remap_io();
        pSeries_request_regions();
 
        pci_addr_cache_build();
index 66698fdf059ec6f39953dfdec83f330fdb238da6..46929fb24f3c1fe64e01ac5c7dc541558d9c7ddb 100644 (file)
@@ -548,6 +548,9 @@ static int __init pcibios_init(void)
        if (ppc64_isabridge_dev != NULL)
                printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
 
+       /* map in PCI I/O space */
+       phbs_remap_io();
+
        printk("PCI: Probing PCI hardware done\n");
 
        return 0;