diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-07 17:32:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-02-07 17:32:24 -0500 |
commit | 95025d6b27721ae8bbce592403fdc06e982204c8 (patch) | |
tree | 04cdc095c1d1b41406ebaf6c5d3639f4d27b3f38 /arch | |
parent | 59c1204d464075fcb5d02e7daa6b23782dd4a088 (diff) | |
parent | 1e05b62ae4bd4c1209229de367b0989b39644f88 (diff) |
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 'arch')
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | arch/mips/lib/iomap-pci.c | 4 | ||||
-rw-r--r-- | arch/sh/Kconfig | 1 | ||||
-rw-r--r-- | arch/sh/drivers/pci/pci.c | 4 |
4 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c4c1312473fb..5ab6e89603c5 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -2356,6 +2356,7 @@ config PCI | |||
2356 | depends on HW_HAS_PCI | 2356 | depends on HW_HAS_PCI |
2357 | select PCI_DOMAINS | 2357 | select PCI_DOMAINS |
2358 | select GENERIC_PCI_IOMAP | 2358 | select GENERIC_PCI_IOMAP |
2359 | select NO_GENERIC_PCI_IOPORT_MAP | ||
2359 | help | 2360 | help |
2360 | Find out whether you have a PCI motherboard. PCI is the name of a | 2361 | Find out whether you have a PCI motherboard. PCI is the name of a |
2361 | bus system, i.e. the way the CPU talks to the other stuff inside | 2362 | bus system, i.e. the way the CPU talks to the other stuff inside |
diff --git a/arch/mips/lib/iomap-pci.c b/arch/mips/lib/iomap-pci.c index 2635b1a96333..fd35daa45314 100644 --- a/arch/mips/lib/iomap-pci.c +++ b/arch/mips/lib/iomap-pci.c | |||
@@ -10,8 +10,8 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <asm/io.h> | 11 | #include <asm/io.h> |
12 | 12 | ||
13 | static void __iomem *ioport_map_pci(struct pci_dev *dev, | 13 | void __iomem *__pci_ioport_map(struct pci_dev *dev, |
14 | unsigned long port, unsigned int nr) | 14 | unsigned long port, unsigned int nr) |
15 | { | 15 | { |
16 | struct pci_controller *ctrl = dev->bus->sysdata; | 16 | struct pci_controller *ctrl = dev->bus->sysdata; |
17 | unsigned long base = ctrl->io_map_base; | 17 | unsigned long base = ctrl->io_map_base; |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 3c8db65c89e5..713fb58ca507 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -859,6 +859,7 @@ config PCI | |||
859 | depends on SYS_SUPPORTS_PCI | 859 | depends on SYS_SUPPORTS_PCI |
860 | select PCI_DOMAINS | 860 | select PCI_DOMAINS |
861 | select GENERIC_PCI_IOMAP | 861 | select GENERIC_PCI_IOMAP |
862 | select NO_GENERIC_PCI_IOPORT_MAP | ||
862 | help | 863 | help |
863 | Find out whether you have a PCI motherboard. PCI is the name of a | 864 | Find out whether you have a PCI motherboard. PCI is the name of a |
864 | bus system, i.e. the way the CPU talks to the other stuff inside | 865 | bus system, i.e. the way the CPU talks to the other stuff inside |
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 8f18dd090a66..1e7b0e2e764d 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
@@ -356,8 +356,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
356 | 356 | ||
357 | #ifndef CONFIG_GENERIC_IOMAP | 357 | #ifndef CONFIG_GENERIC_IOMAP |
358 | 358 | ||
359 | static void __iomem *ioport_map_pci(struct pci_dev *dev, | 359 | void __iomem *__pci_ioport_map(struct pci_dev *dev, |
360 | unsigned long port, unsigned int nr) | 360 | unsigned long port, unsigned int nr) |
361 | { | 361 | { |
362 | struct pci_channel *chan = dev->sysdata; | 362 | struct pci_channel *chan = dev->sysdata; |
363 | 363 | ||