Skip to contentSkip to conversation

iomap interface issue

DISCUSSION Anton Blanchard 2 participants 3 messages May 3, 2005 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

Hi,

I was looking through the iomap API and noticed that pci_iounmap only takes a pci_dev and address:

void pci_iounmap(struct pci_dev *dev, void __iomem *addr)

At the moment the ppc64 interface does nothing on iounmap, but for hotplug we need to tear down MMU entries associated with MMIO regions. This is because we need to ensure all entries are removed before the adapter is moved to another partition (or else the old partition could still access the device).

With the current API we could work out if an address is IO or MMIO but it will be a bit ugly. I was wondering if it made sense to pass in the BAR to pci_iounmap. That would make it easy to work out if its an MMIO region.

Anton

#1 lore raw
Quoted 4 lines · On Tue, 3 May 2005 10:47:56 +1000 Anton Blanchard <[email protected]> wrote:

With the current API we could work out if an address is IO or MMIO but it will be a bit ugly. I was wondering if it made sense to pass in the BAR to pci_iounmap. That would make it easy to work out if its an MMIO region.

If anything, a pointer to the resource would be more appropriate.

#2 lore raw
Quoted 2 lines

If anything, a pointer to the resource would be more appropriate.

Perhaps, although that would mean pci_iomap takes a BAR and pci_iounmap takes a resource.

Anton