diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-05-29 04:22:21 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-01-21 06:58:49 +0100 |
commit | eb29d8d2aad70636ea23810b4868693673d630d5 (patch) | |
tree | f62b6c19f812b6f731dc90b3ae9989822b3749e6 /include/asm-generic/pci_iomap.h | |
parent | mn10300: drop dead code (diff) | |
download | linux-eb29d8d2aad70636ea23810b4868693673d630d5.tar.xz linux-eb29d8d2aad70636ea23810b4868693673d630d5.zip |
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.h | 10 |
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 */ |