The new pci_iounmap_io() function can be used to unmap a fixed PCI I/O
mapping as established by pci_ioremap_io(). This will be useful to
support unbinding of PCI host drivers.
vidyas: make similar change for ARM64
based on http://git-master/r/#/c/450679
Bug
1496843
Change-Id: I5d1cbcf4f66b89b9711d6897ed444b680d20d613
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/454937
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
#define IOMEM(x) ((void __force __iomem *)(x))
extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr);
+extern void pci_iounmap_io(unsigned int offset);
+
/*
* More restrictive address range checking than the default implementation
__pgprot(PROT_DEVICE_nGnRE));
}
EXPORT_SYMBOL_GPL(pci_ioremap_io);
+
+void pci_iounmap_io(unsigned int offset)
+{
+ unmap_kernel_range(PCI_IOBASE + offset, SZ_64K);
+}
+EXPORT_SYMBOL_GPL(pci_iounmap_io);
+
#endif
void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size)
{