diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-07-26 06:07:13 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-26 08:17:48 +0200 |
commit | 50747cb8189d54369d75e1bd73f84db431d39af8 (patch) | |
tree | e82c3c58743f1c6a545b7336656fcca2fed6f64a /arch/powerpc/kernel/iomap.c | |
parent | [POWERPC] Add function to check if address is an IO port (diff) | |
download | linux-50747cb8189d54369d75e1bd73f84db431d39af8.tar.xz linux-50747cb8189d54369d75e1bd73f84db431d39af8.zip |
[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/powerpc/kernel/iomap.c')
-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 @@ #include <linux/pci.h> #include <linux/mm.h> #include <asm/io.h> +#include <asm/pci-bridge.h> /* * 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) void pci_iounmap(struct pci_dev *dev, void __iomem *addr) { - /* Nothing to do */ + if (isa_vaddr_is_ioport(addr)) + return; + if (pcibios_vaddr_is_ioport(addr)) + return; + iounmap(addr); } + EXPORT_SYMBOL(pci_iomap); EXPORT_SYMBOL(pci_iounmap); |