diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 21:04:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 21:04:27 -0500 |
commit | e343a895a9f342f239c5e3c5ffc6c0b1707e6244 (patch) | |
tree | 46c81c6ae375b1f14e209b13c8ac020842807ece /arch/microblaze | |
parent | 06792c4dde2ad143928cc95c1ba218c6269c494b (diff) | |
parent | 193a667fba76b3df482cbf865228e26ee246e889 (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
lib: use generic pci_iomap on all architectures
Many architectures don't want to pull in iomap.c,
so they ended up duplicating pci_iomap from that file.
That function isn't trivial, and we are going to modify it
https://lkml.org/lkml/2011/11/14/183
so the duplication hurts.
This reduces the scope of the problem significantly,
by moving pci_iomap to a separate file and
referencing that from all architectures.
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
alpha: drop pci_iomap/pci_iounmap from pci-noop.c
mn10300: switch to GENERIC_PCI_IOMAP
mn10300: add missing __iomap markers
frv: switch to GENERIC_PCI_IOMAP
tile: switch to GENERIC_PCI_IOMAP
tile: don't panic on iomap
sparc: switch to GENERIC_PCI_IOMAP
sh: switch to GENERIC_PCI_IOMAP
powerpc: switch to GENERIC_PCI_IOMAP
parisc: switch to GENERIC_PCI_IOMAP
mips: switch to GENERIC_PCI_IOMAP
microblaze: switch to GENERIC_PCI_IOMAP
arm: switch to GENERIC_PCI_IOMAP
alpha: switch to GENERIC_PCI_IOMAP
lib: add GENERIC_PCI_IOMAP
lib: move GENERIC_IOMAP to lib/Kconfig
Fix up trivial conflicts due to changes nearby in arch/{m68k,score}/Kconfig
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/Kconfig | 1 | ||||
-rw-r--r-- | arch/microblaze/pci/iomap.c | 19 |
2 files changed, 1 insertions, 19 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index e446bab2427b..f0eead74fff6 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -17,6 +17,7 @@ config MICROBLAZE | |||
17 | select HAVE_GENERIC_HARDIRQS | 17 | select HAVE_GENERIC_HARDIRQS |
18 | select GENERIC_IRQ_PROBE | 18 | select GENERIC_IRQ_PROBE |
19 | select GENERIC_IRQ_SHOW | 19 | select GENERIC_IRQ_SHOW |
20 | select GENERIC_PCI_IOMAP | ||
20 | 21 | ||
21 | config SWAP | 22 | config SWAP |
22 | def_bool n | 23 | def_bool n |
diff --git a/arch/microblaze/pci/iomap.c b/arch/microblaze/pci/iomap.c index 57acda852f5a..b07abbac0319 100644 --- a/arch/microblaze/pci/iomap.c +++ b/arch/microblaze/pci/iomap.c | |||
@@ -10,25 +10,6 @@ | |||
10 | #include <asm/io.h> | 10 | #include <asm/io.h> |
11 | #include <asm/pci-bridge.h> | 11 | #include <asm/pci-bridge.h> |
12 | 12 | ||
13 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ||
14 | { | ||
15 | resource_size_t start = pci_resource_start(dev, bar); | ||
16 | resource_size_t len = pci_resource_len(dev, bar); | ||
17 | unsigned long flags = pci_resource_flags(dev, bar); | ||
18 | |||
19 | if (!len) | ||
20 | return NULL; | ||
21 | if (max && len > max) | ||
22 | len = max; | ||
23 | if (flags & IORESOURCE_IO) | ||
24 | return ioport_map(start, len); | ||
25 | if (flags & IORESOURCE_MEM) | ||
26 | return ioremap(start, len); | ||
27 | /* What? */ | ||
28 | return NULL; | ||
29 | } | ||
30 | EXPORT_SYMBOL(pci_iomap); | ||
31 | |||
32 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 13 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
33 | { | 14 | { |
34 | if (isa_vaddr_is_ioport(addr)) | 15 | if (isa_vaddr_is_ioport(addr)) |