summaryrefslogtreecommitdiff
path: root/include/asm-generic/pci_iomap.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-05-29 11:52:21 +0930
committerRusty Russell <rusty@rustcorp.com.au>2015-01-21 16:28:49 +1030
commiteb29d8d2aad70636ea23810b4868693673d630d5 (patch)
treef62b6c19f812b6f731dc90b3ae9989822b3749e6 /include/asm-generic/pci_iomap.h
parent54cfe08b5f352d9aa4979e2434e85907c84af07a (diff)
pci: add pci_iomap_range
Virtio drivers should map the part of the BAR they need, not necessarily all of it. Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: linux-pci@vger.kernel.org Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/asm-generic/pci_iomap.h')
-rw-r--r--include/asm-generic/pci_iomap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h
index ce37349860fe..7389c87116a0 100644
--- a/include/asm-generic/pci_iomap.h
+++ b/include/asm-generic/pci_iomap.h
@@ -15,6 +15,9 @@ struct pci_dev;
#ifdef CONFIG_PCI
/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
+extern void __iomem *pci_iomap_range(struct pci_dev *dev, int bar,
+ unsigned long offset,
+ unsigned long maxlen);
/* Create a virtual mapping cookie for a port on a given PCI device.
* Do not call this directly, it exists to make it easier for architectures
* to override */
@@ -30,6 +33,13 @@ static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned lon
{
return NULL;
}
+
+static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar,
+ unsigned long offset,
+ unsigned long maxlen)
+{
+ return NULL;
+}
#endif
#endif /* __ASM_GENERIC_IO_H */