Skip to content

Commit

Permalink
[POWERPC] Make pci_iounmap actually unmap things
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jul 26, 2007
1 parent 6dfbde2 commit 50747cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/powerpc/kernel/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

0 comments on commit 50747cb

Please sign in to comment.