diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-07-26 00:07:13 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-26 02:17:48 -0400 |
commit | 50747cb8189d54369d75e1bd73f84db431d39af8 (patch) | |
tree | e82c3c58743f1c6a545b7336656fcca2fed6f64a /arch | |
parent | 6dfbde209171cd15407e7540d363a434a489aaca (diff) |
[POWERPC] Make pci_iounmap actually unmap things
This patch uses the newly added functions for testing if an address is
an ISA or PCI IO port to properly unmap things in pci_iounmap that
aren't such ports. Without that, drivers using the iomap API will never
actually unmap resources, which on IBM server machines will prevent
hot-unplug of the corresponding HW adapters.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/iomap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 601ef79a5916..2a5cf8680370 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
10 | #include <asm/pci-bridge.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * Here comes the ppc64 implementation of the IOMAP | 13 | * Here comes the ppc64 implementation of the IOMAP |
@@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | |||
136 | 137 | ||
137 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 138 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
138 | { | 139 | { |
139 | /* Nothing to do */ | 140 | if (isa_vaddr_is_ioport(addr)) |
141 | return; | ||
142 | if (pcibios_vaddr_is_ioport(addr)) | ||
143 | return; | ||
144 | iounmap(addr); | ||
140 | } | 145 | } |
146 | |||
141 | EXPORT_SYMBOL(pci_iomap); | 147 | EXPORT_SYMBOL(pci_iomap); |
142 | EXPORT_SYMBOL(pci_iounmap); | 148 | EXPORT_SYMBOL(pci_iounmap); |