parisc: Use generic pci_mmap_resource_range()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Apr 2017 12:26:04 +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/parisc/include/asm/pci.h
arch/parisc/kernel/pci.c

index bb9ea9003e08347bc121b9b03dbdd8c0d76ebc4e..1de1a3f412ec142514d76bbb0edfda171fb0f510 100644 (file)
@@ -200,5 +200,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 }
 
 #define HAVE_PCI_MMAP
+#define ARCH_GENERIC_PCI_MMAP_RESOURCE
 
 #endif /* __ASM_PARISC_PCI_H */
index 653877553acd94594e2a1818406b5eca075cfc72..13ee3569959acf7bf0a161fe2ae8beca32533740 100644 (file)
@@ -227,35 +227,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)
-{
-       unsigned long prot;
-
-       /*
-        * I/O space can be accessed via normal processor loads and stores on
-        * this platform but for now we elect not to do this and portable
-        * drivers should not do this anyway.
-        */
-       if (mmap_state == pci_mmap_io)
-               return -EINVAL;
-
-       if (write_combine)
-               return -EINVAL;
-
-       /*
-        * Ignore write-combine; for now only return uncached mappings.
-        */
-       prot = pgprot_val(vma->vm_page_prot);
-       prot |= _PAGE_NO_CACHE;
-       vma->vm_page_prot = __pgprot(prot);
-
-       return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
-               vma->vm_end - vma->vm_start, vma->vm_page_prot);
-}
-
 /*
  * A driver is enabling the device.  We make sure that all the appropriate
  * bits are set to allow the device to operate as the driver is expecting.