aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-05-28 22:22:21 -0400
committerRusty Russell <rusty@rustcorp.com.au>2015-01-21 00:58:49 -0500
commiteb29d8d2aad70636ea23810b4868693673d630d5 (patch)
treef62b6c19f812b6f731dc90b3ae9989822b3749e6 /include/asm-generic
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')
-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;
15#ifdef CONFIG_PCI 15#ifdef CONFIG_PCI
16/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ 16/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
17extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); 17extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
18extern void __iomem *pci_iomap_range(struct pci_dev *dev, int bar,
19 unsigned long offset,
20 unsigned long maxlen);
18/* Create a virtual mapping cookie for a port on a given PCI device. 21/* Create a virtual mapping cookie for a port on a given PCI device.
19 * Do not call this directly, it exists to make it easier for architectures 22 * Do not call this directly, it exists to make it easier for architectures
20 * to override */ 23 * to override */
@@ -30,6 +33,13 @@ static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned lon
30{ 33{
31 return NULL; 34 return NULL;
32} 35}
36
37static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar,
38 unsigned long offset,
39 unsigned long maxlen)
40{
41 return NULL;
42}
33#endif 43#endif
34 44
35#endif /* __ASM_GENERIC_IO_H */ 45#endif /* __ASM_GENERIC_IO_H */