Merge branch 'pci/resource-mmap' into next
* pci/resource-mmap: ia64: Use generic pci_mmap_resource_range() ia64: Remove redundant checks for WC in pci_mmap_page_range() ia64: Remove redundant valid_mmap_phys_addr_range() from pci_mmap_page_range() PCI: Add I/O BAR support to generic pci_mmap_resource_range() x86/PCI: Use generic pci_mmap_resource_range() unicore32/PCI: Use generic pci_mmap_resource_range() sh/PCI: Use generic pci_mmap_resource_range() parisc: Use generic pci_mmap_resource_range() mn10300/PCI: Use generic pci_mmap_resource_range() MIPS: PCI: Use generic pci_mmap_resource_range() cris/PCI: Use generic pci_mmap_resource_range() ARM/PCI: Use generic pci_mmap_resource_range() PCI: Add pci_mmap_resource_range() and use it for ARM64 PCI: Add BAR index argument to pci_mmap_page_range() PCI: Use BAR index in sysfs attr->private instead of resource pointer PCI: Add arch_can_pci_mmap_io() on architectures which can mmap() I/O space PCI: Move multiple declarations of pci_mmap_page_range() to <linux/pci.h> PCI: Add arch_can_pci_mmap_wc() macro xtensa/PCI: Do not mmap PCI BARs to userspace as write-through PCI: Only allow WC mmap on prefetchable resources PCI: Fix another sanity check bug in /proc/pci mmap PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
This commit is contained in:
@@ -1617,6 +1617,36 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
|
||||
|
||||
#include <asm/pci.h>
|
||||
|
||||
/* These two functions provide almost identical functionality. Depennding
|
||||
* on the architecture, one will be implemented as a wrapper around the
|
||||
* other (in drivers/pci/mmap.c).
|
||||
*
|
||||
* pci_mmap_resource_range() maps a specific BAR, and vm->vm_pgoff
|
||||
* is expected to be an offset within that region.
|
||||
*
|
||||
* pci_mmap_page_range() is the legacy architecture-specific interface,
|
||||
* which accepts a "user visible" resource address converted by
|
||||
* pci_resource_to_user(), as used in the legacy mmap() interface in
|
||||
* /proc/bus/pci/.
|
||||
*/
|
||||
int pci_mmap_resource_range(struct pci_dev *dev, int bar,
|
||||
struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state, int write_combine);
|
||||
int pci_mmap_page_range(struct pci_dev *pdev, int bar,
|
||||
struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state, int write_combine);
|
||||
|
||||
#ifndef arch_can_pci_mmap_wc
|
||||
#define arch_can_pci_mmap_wc() 0
|
||||
#endif
|
||||
|
||||
#ifndef arch_can_pci_mmap_io
|
||||
#define arch_can_pci_mmap_io() 0
|
||||
#define pci_iobar_pfn(pdev, bar, vma) (-EINVAL)
|
||||
#else
|
||||
int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma);
|
||||
#endif
|
||||
|
||||
#ifndef pci_root_bus_fwnode
|
||||
#define pci_root_bus_fwnode(bus) NULL
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user