Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Move multiple declarations of pci_mmap_page_range() to <linux/pci.h>

We can declare it <linux/pci.h> even on platforms where it isn't going to
be defined. There's no need to have it littered through the various
<asm/pci.h> files.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

David Woodhouse and committed by
Bjorn Helgaas
11df1954 ae749c7a

+8 -38
-2
arch/arm/include/asm/pci.h
··· 29 29 #define PCI_DMA_BUS_IS_PHYS (1) 30 30 31 31 #define HAVE_PCI_MMAP 32 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 33 - enum pci_mmap_state mmap_state, int write_combine); 34 32 35 33 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 36 34 {
-3
arch/cris/include/asm/pci.h
··· 42 42 #define PCI_DMA_BUS_IS_PHYS (1) 43 43 44 44 #define HAVE_PCI_MMAP 45 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 46 - enum pci_mmap_state mmap_state, int write_combine); 47 - 48 45 49 46 #endif /* __KERNEL__ */ 50 47
-2
arch/ia64/include/asm/pci.h
··· 53 53 #define HAVE_PCI_MMAP 54 54 #define arch_can_pci_mmap_wc() 1 55 55 56 - extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, 57 - enum pci_mmap_state mmap_state, int write_combine); 58 56 #define HAVE_PCI_LEGACY 59 57 extern int pci_mmap_legacy_page_range(struct pci_bus *bus, 60 58 struct vm_area_struct *vma,
-3
arch/microblaze/include/asm/pci.h
··· 46 46 extern int pci_proc_domain(struct pci_bus *bus); 47 47 48 48 struct vm_area_struct; 49 - /* Map a range of PCI memory or I/O space for a device into user space */ 50 - int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, 51 - enum pci_mmap_state mmap_state, int write_combine); 52 49 53 50 /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ 54 51 #define HAVE_PCI_MMAP 1
-3
arch/mips/include/asm/pci.h
··· 111 111 112 112 #define HAVE_PCI_MMAP 113 113 114 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 115 - enum pci_mmap_state mmap_state, int write_combine); 116 - 117 114 #define HAVE_ARCH_PCI_RESOURCE_TO_USER 118 115 119 116 /*
-3
arch/mn10300/include/asm/pci.h
··· 74 74 } 75 75 76 76 #define HAVE_PCI_MMAP 77 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 78 - enum pci_mmap_state mmap_state, 79 - int write_combine); 80 77 81 78 #endif /* __KERNEL__ */ 82 79
-3
arch/parisc/include/asm/pci.h
··· 201 201 202 202 #define HAVE_PCI_MMAP 203 203 204 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 205 - enum pci_mmap_state mmap_state, int write_combine); 206 - 207 204 #endif /* __ASM_PARISC_PCI_H */
-3
arch/powerpc/include/asm/pci.h
··· 77 77 extern int pci_proc_domain(struct pci_bus *bus); 78 78 79 79 struct vm_area_struct; 80 - /* Map a range of PCI memory or I/O space for a device into user space */ 81 - int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, 82 - enum pci_mmap_state mmap_state, int write_combine); 83 80 84 81 /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() and it does WC */ 85 82 #define HAVE_PCI_MMAP 1
+1 -2
arch/sh/include/asm/pci.h
··· 66 66 struct pci_dev; 67 67 68 68 #define HAVE_PCI_MMAP 69 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 70 - enum pci_mmap_state mmap_state, int write_combine); 69 + 71 70 extern void pcibios_set_master(struct pci_dev *dev); 72 71 73 72 /* Dynamic DMA mapping stuff.
-4
arch/sparc/include/asm/pci_64.h
··· 45 45 #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA 46 46 #define get_pci_unmapped_area get_fb_unmapped_area 47 47 48 - int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 49 - enum pci_mmap_state mmap_state, 50 - int write_combine); 51 - 52 48 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 53 49 { 54 50 return PCI_IRQ_NONE;
-2
arch/unicore32/include/asm/pci.h
··· 17 17 #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ 18 18 19 19 #define HAVE_PCI_MMAP 20 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 21 - enum pci_mmap_state mmap_state, int write_combine); 22 20 23 21 #endif /* __KERNEL__ */ 24 22 #endif
-4
arch/x86/include/asm/pci.h
··· 104 104 105 105 #define HAVE_PCI_MMAP 106 106 #define arch_can_pci_mmap_wc() pat_enabled() 107 - extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 108 - enum pci_mmap_state mmap_state, 109 - int write_combine); 110 - 111 107 112 108 #ifdef CONFIG_PCI 113 109 extern void early_quirks(void);
-4
arch/xtensa/include/asm/pci.h
··· 46 46 47 47 #define PCI_DMA_BUS_IS_PHYS (1) 48 48 49 - /* Map a range of PCI memory or I/O space for a device into user space */ 50 - int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, 51 - enum pci_mmap_state mmap_state, int write_combine); 52 - 53 49 /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ 54 50 #define HAVE_PCI_MMAP 1 55 51
+7
include/linux/pci.h
··· 1626 1626 1627 1627 #include <asm/pci.h> 1628 1628 1629 + /* Map a range of PCI memory or I/O space for a device into user space. 1630 + * Architectures provide this function if they set HAVE_PCI_MMAP, and 1631 + * it accepts the 'write_combine' argument when arch_can_pci_mmap_wc() 1632 + * evaluates to nonzero. */ 1633 + int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, 1634 + enum pci_mmap_state mmap_state, int write_combine); 1635 + 1629 1636 #ifndef arch_can_pci_mmap_wc 1630 1637 #define arch_can_pci_mmap_wc() 0 1631 1638 #endif