mips: use the the PCI controller's io_map_base
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 29 Jan 2012 22:23:38 +0000 (00:23 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 31 Jan 2012 21:20:30 +0000 (23:20 +0200)
commit eab90291d35438bcebf7c3dc85be66d0f24e3002
(mips: switch to GENERIC_PCI_IOMAP)
failed to take into account the PCI controller's
io_map_base for mapping IO BARs.
This also caused a new warning on mips.

Fix this, without re-introducing code duplication,
by setting NO_GENERIC_PCI_IOPORT_MAP
and supplying a mips-specific __pci_ioport_map.

Reported-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
arch/mips/Kconfig
arch/mips/lib/iomap-pci.c

index c4c1312473fbf6cd9104cc3d206846bcd38b1b4b..5ab6e89603c56bc461de1b4390ada67482749c2e 100644 (file)
@@ -2356,6 +2356,7 @@ config PCI
        depends on HW_HAS_PCI
        select PCI_DOMAINS
        select GENERIC_PCI_IOMAP
+       select NO_GENERIC_PCI_IOPORT_MAP
        help
          Find out whether you have a PCI motherboard. PCI is the name of a
          bus system, i.e. the way the CPU talks to the other stuff inside
index 2635b1a9633385568677b9a121f50adb6f96d8b7..fd35daa45314a370b89f521e3ec401d39e5dfdc9 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/module.h>
 #include <asm/io.h>
 
-static void __iomem *ioport_map_pci(struct pci_dev *dev,
-                                     unsigned long port, unsigned int nr)
+void __iomem *__pci_ioport_map(struct pci_dev *dev,
+                              unsigned long port, unsigned int nr)
 {
        struct pci_controller *ctrl = dev->bus->sysdata;
        unsigned long base = ctrl->io_map_base;