summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-02-07 23:32:24 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-02-07 23:32:24 +0100
commit95025d6b27721ae8bbce592403fdc06e982204c8 (patch)
tree04cdc095c1d1b41406ebaf6c5d3639f4d27b3f38 /lib
parentACPI: remove duplicated lines of merging problems with acpi_processor_add (diff)
parentsh: use the the PCI channels's io_map_base (diff)
downloadlinux-95025d6b27721ae8bbce592403fdc06e982204c8.tar.xz
linux-95025d6b27721ae8bbce592403fdc06e982204c8.zip
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
arch: fix ioport mapping on mips,sh Kevin Cernekee reported that recent cleanup that replaced pci_iomap with a generic function failed to take into account the differences in io port handling on mips and sh architectures. Rather than revert the changes reintroducing the code duplication, this patchset fixes this by adding ability for architectures to override ioport mapping for pci devices. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: sh: use the the PCI channels's io_map_base mips: use the the PCI controller's io_map_base lib: add NO_GENERIC_PCI_IOPORT_MAP
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig3
-rw-r--r--lib/pci_iomap.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index d69d321a0997..028aba9e72af 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -19,6 +19,9 @@ config RATIONAL
config GENERIC_FIND_FIRST_BIT
bool
+config NO_GENERIC_PCI_IOPORT_MAP
+ bool
+
config GENERIC_PCI_IOMAP
bool
diff --git a/lib/pci_iomap.c b/lib/pci_iomap.c
index 4b0fdc22e688..0d83ea8a9605 100644
--- a/lib/pci_iomap.c
+++ b/lib/pci_iomap.c
@@ -34,7 +34,7 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
if (maxlen && len > maxlen)
len = maxlen;
if (flags & IORESOURCE_IO)
- return ioport_map(start, len);
+ return __pci_ioport_map(dev, start, len);
if (flags & IORESOURCE_MEM) {
if (flags & IORESOURCE_CACHEABLE)
return ioremap(start, len);