diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2017-04-12 13:26:03 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-04-20 08:47:47 -0500 |
commit | 903bdbe271217f656d13767d8a3e74b8aabc54c2 (patch) | |
tree | 937d43842a212b6e336c22e049e4e23185f2778d | |
parent | 35368f80403d32a993587c7f26cd3bcede3ed202 (diff) | |
download | blackbird-op-linux-903bdbe271217f656d13767d8a3e74b8aabc54c2.tar.gz blackbird-op-linux-903bdbe271217f656d13767d8a3e74b8aabc54c2.zip |
mn10300/PCI: Use generic pci_mmap_resource_range()
This was setting vma->vm_flags |= VM_LOCKED. Not sure why...
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | arch/mn10300/include/asm/pci.h | 1 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/pci-asb2305.c | 24 |
2 files changed, 1 insertions, 24 deletions
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h index 082b6de90936..d27654902f28 100644 --- a/arch/mn10300/include/asm/pci.h +++ b/arch/mn10300/include/asm/pci.h @@ -74,6 +74,7 @@ static inline int pci_controller_num(struct pci_dev *dev) } #define HAVE_PCI_MMAP +#define ARCH_GENERIC_PCI_MMAP_RESOURCE #endif /* __KERNEL__ */ diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.c b/arch/mn10300/unit-asb2305/pci-asb2305.c index 4abbbd54ac7d..e0f4617c0c7a 100644 --- a/arch/mn10300/unit-asb2305/pci-asb2305.c +++ b/arch/mn10300/unit-asb2305/pci-asb2305.c @@ -210,27 +210,3 @@ void __init pcibios_resource_survey(void) pcibios_allocate_resources(0); pcibios_allocate_resources(1); } - -int pci_mmap_page_range(struct pci_dev *dev, int bar, - struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine) -{ - unsigned long prot; - - /* Leave vm_pgoff as-is, the PCI space address is the physical - * address on this platform. - */ - vma->vm_flags |= VM_LOCKED; - - prot = pgprot_val(vma->vm_page_prot); - prot &= ~_PAGE_CACHE; - vma->vm_page_prot = __pgprot(prot); - - /* Write-combine setting is ignored */ - if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) - return -EAGAIN; - - return 0; -} |