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

PCI: Move pci_dma_* helpers to common code

For a long time all architectures implement the pci_dma_* functions using
the generic DMA API, and they all use the same header to do so.

Move this header, pci-dma-compat.h, to include/linux and include it from
the generic pci.h instead of having each arch duplicate this include.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Christoph Hellwig and committed by
Bjorn Helgaas
bc4b024a 611609bc

+4 -49
-7
arch/alpha/include/asm/pci.h
··· 65 65 decisions. */ 66 66 #define PCI_DMA_BUS_IS_PHYS 0 67 67 68 - #ifdef CONFIG_PCI 69 - 70 - /* implement the pci_ DMA API in terms of the generic device dma_ one */ 71 - #include <asm-generic/pci-dma-compat.h> 72 - 73 - #endif 74 - 75 68 /* TODO: integrate with include/asm-generic/pci.h ? */ 76 69 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 77 70 {
-1
arch/arm/include/asm/pci.h
··· 2 2 #define ASMARM_PCI_H 3 3 4 4 #ifdef __KERNEL__ 5 - #include <asm-generic/pci-dma-compat.h> 6 5 #include <asm/mach/pci.h> /* for pci_sys_data */ 7 6 8 7 extern unsigned long pcibios_min_io;
-1
arch/arm64/include/asm/pci.h
··· 7 7 #include <linux/dma-mapping.h> 8 8 9 9 #include <asm/io.h> 10 - #include <asm-generic/pci-dma-compat.h> 11 10 12 11 #define PCIBIOS_MIN_IO 0x1000 13 12 #define PCIBIOS_MIN_MEM 0
-2
arch/avr32/include/asm/pci.h
··· 5 5 6 6 #define PCI_DMA_BUS_IS_PHYS (1) 7 7 8 - #include <asm-generic/pci-dma-compat.h> 9 - 10 8 #endif /* __ASM_AVR32_PCI_H__ */
-1
arch/blackfin/include/asm/pci.h
··· 4 4 #define _ASM_BFIN_PCI_H 5 5 6 6 #include <linux/scatterlist.h> 7 - #include <asm-generic/pci-dma-compat.h> 8 7 #include <asm-generic/pci.h> 9 8 10 9 #define PCIBIOS_MIN_IO 0x00001000
-3
arch/cris/include/asm/pci.h
··· 48 48 49 49 #endif /* __KERNEL__ */ 50 50 51 - /* implement the pci_ DMA API in terms of the generic device dma_ one */ 52 - #include <asm-generic/pci-dma-compat.h> 53 - 54 51 /* generic pci stuff */ 55 52 #include <asm-generic/pci.h> 56 53
-1
arch/frv/include/asm/pci.h
··· 15 15 16 16 #include <linux/mm.h> 17 17 #include <linux/scatterlist.h> 18 - #include <asm-generic/pci-dma-compat.h> 19 18 #include <asm-generic/pci.h> 20 19 21 20 struct pci_dev;
-2
arch/ia64/include/asm/pci.h
··· 50 50 extern unsigned long ia64_max_iommu_merge_mask; 51 51 #define PCI_DMA_BUS_IS_PHYS (ia64_max_iommu_merge_mask == ~0UL) 52 52 53 - #include <asm-generic/pci-dma-compat.h> 54 - 55 53 #define HAVE_PCI_MMAP 56 54 extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, 57 55 enum pci_mmap_state mmap_state, int write_combine);
-1
arch/m68k/include/asm/pci.h
··· 1 1 #ifndef _ASM_M68K_PCI_H 2 2 #define _ASM_M68K_PCI_H 3 3 4 - #include <asm-generic/pci-dma-compat.h> 5 4 #include <asm-generic/pci.h> 6 5 7 6 /* The PCI address space does equal the physical memory
-2
arch/microblaze/include/asm/pci.h
··· 22 22 #include <asm/prom.h> 23 23 #include <asm/pci-bridge.h> 24 24 25 - #include <asm-generic/pci-dma-compat.h> 26 - 27 25 #define PCIBIOS_MIN_IO 0x1000 28 26 #define PCIBIOS_MIN_MEM 0x10000000 29 27
-3
arch/mips/include/asm/pci.h
··· 124 124 125 125 #endif /* __KERNEL__ */ 126 126 127 - /* implement the pci_ DMA API in terms of the generic device dma_ one */ 128 - #include <asm-generic/pci-dma-compat.h> 129 - 130 127 /* Do platform specific device initialization at pci_enable_device() time */ 131 128 extern int pcibios_plat_dev_init(struct pci_dev *dev); 132 129
-3
arch/mn10300/include/asm/pci.h
··· 80 80 81 81 #endif /* __KERNEL__ */ 82 82 83 - /* implement the pci_ DMA API in terms of the generic device dma_ one */ 84 - #include <asm-generic/pci-dma-compat.h> 85 - 86 83 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 87 84 { 88 85 return channel ? 15 : 14;
-3
arch/parisc/include/asm/pci.h
··· 194 194 #define PCIBIOS_MIN_IO 0x10 195 195 #define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */ 196 196 197 - /* export the pci_ DMA API in terms of the dma_ one */ 198 - #include <asm-generic/pci-dma-compat.h> 199 - 200 197 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) 201 198 { 202 199 return channel ? 15 : 14;
-2
arch/powerpc/include/asm/pci.h
··· 20 20 #include <asm/prom.h> 21 21 #include <asm/pci-bridge.h> 22 22 23 - #include <asm-generic/pci-dma-compat.h> 24 - 25 23 /* Return values for pci_controller_ops.probe_mode function */ 26 24 #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ 27 25 #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */
-1
arch/s390/include/asm/pci.h
··· 9 9 #include <linux/pci.h> 10 10 #include <linux/mutex.h> 11 11 #include <asm-generic/pci.h> 12 - #include <asm-generic/pci-dma-compat.h> 13 12 #include <asm/pci_clp.h> 14 13 #include <asm/pci_debug.h> 15 14
-3
arch/sh/include/asm/pci.h
··· 105 105 return channel ? 15 : 14; 106 106 } 107 107 108 - /* generic DMA-mapping stuff */ 109 - #include <asm-generic/pci-dma-compat.h> 110 - 111 108 #endif /* __KERNEL__ */ 112 109 #endif /* __ASM_SH_PCI_H */ 113 110
-3
arch/sparc/include/asm/pci.h
··· 5 5 #else 6 6 #include <asm/pci_32.h> 7 7 #endif 8 - 9 - #include <asm-generic/pci-dma-compat.h> 10 - 11 8 #endif
-3
arch/tile/include/asm/pci.h
··· 226 226 /* Use any cpu for PCI. */ 227 227 #define cpumask_of_pcibus(bus) cpu_online_mask 228 228 229 - /* implement the pci_ DMA API in terms of the generic device dma_ one */ 230 - #include <asm-generic/pci-dma-compat.h> 231 - 232 229 #endif /* _ASM_TILE_PCI_H */
-1
arch/unicore32/include/asm/pci.h
··· 13 13 #define __UNICORE_PCI_H__ 14 14 15 15 #ifdef __KERNEL__ 16 - #include <asm-generic/pci-dma-compat.h> 17 16 #include <asm-generic/pci.h> 18 17 #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ 19 18
-3
arch/x86/include/asm/pci.h
··· 105 105 #include <asm/pci_64.h> 106 106 #endif 107 107 108 - /* implement the pci_ DMA API in terms of the generic device dma_ one */ 109 - #include <asm-generic/pci-dma-compat.h> 110 - 111 108 /* generic pci stuff */ 112 109 #include <asm-generic/pci.h> 113 110
-3
arch/xtensa/include/asm/pci.h
··· 55 55 56 56 #endif /* __KERNEL__ */ 57 57 58 - /* Implement the pci_ DMA API in terms of the generic device dma_ one */ 59 - #include <asm-generic/pci-dma-compat.h> 60 - 61 58 /* Generic PCI */ 62 59 #include <asm-generic/pci.h> 63 60
include/asm-generic/pci-dma-compat.h include/linux/pci-dma-compat.h
+4
include/linux/pci.h
··· 2011 2011 { 2012 2012 return bus->self && bus->self->ari_enabled; 2013 2013 } 2014 + 2015 + /* provide the legacy pci_dma_* API */ 2016 + #include <linux/pci-dma-compat.h> 2017 + 2014 2018 #endif /* LINUX_PCI_H */