ARM/PCI: Use generic pci_mmap_resource_range()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Apr 2017 12:26:00 +0000 (13:26 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 20 Apr 2017 13:47:47 +0000 (08:47 -0500)
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/arm/include/asm/pci.h
arch/arm/kernel/bios32.c

index 51118a0cabbcde80b0d38a989f5c9ad2d3d66916..396c92bcc0cf3a903276d9fea00365ad649fc9af 100644 (file)
@@ -29,6 +29,7 @@ static inline int pci_proc_domain(struct pci_bus *bus)
 #define PCI_DMA_BUS_IS_PHYS     (1)
 
 #define HAVE_PCI_MMAP
+#define ARCH_GENERIC_PCI_MMAP_RESOURCE
 
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
index a4fc3f46eeaefdfadd31e00198a835e6d758b77d..b259956365a06b63c923f96946f851531708264c 100644 (file)
@@ -597,26 +597,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
        return start;
 }
 
-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)
-{
-       if (mmap_state == pci_mmap_io)
-               return -EINVAL;
-
-       /*
-        * Mark this as IO
-        */
-       vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-
-       if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
-                            vma->vm_end - vma->vm_start,
-                            vma->vm_page_prot))
-               return -EAGAIN;
-
-       return 0;
-}
-
 void __init pci_map_io_early(unsigned long pfn)
 {
        struct map_desc pci_io_desc = {