[PATCH] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n

With CONFIG_PCI=n:

In file included from include/linux/pci.h:917,
from lib/iomap.c:6:
include/asm/pci.h:104: warning: `enum pci_dma_burst_strategy' declared inside parameter list
include/asm/pci.h:104: warning: its scope is only this definition or declaration, which is probably not what you want.
include/asm/pci.h: In function `pci_dma_burst_advice':
include/asm/pci.h:106: dereferencing pointer to incomplete type
include/asm/pci.h:106: `PCI_DMA_BURST_INFINITY' undeclared (first use in this function)
include/asm/pci.h:106: (Each undeclared identifier is reported only once
include/asm/pci.h:106: for each function it appears in.)
make[1]: *** [lib/iomap.o] Error 1

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Andrew Morton and committed by Greg Kroah-Hartman bb4a61b6 e24c2d96

+32
+2
include/asm-alpha/pci.h
··· 223 /* Nothing to do. */ 224 } 225 226 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 227 enum pci_dma_burst_strategy *strat, 228 unsigned long *strategy_parameter) ··· 240 *strat = PCI_DMA_BURST_BOUNDARY; 241 *strategy_parameter = cacheline_size; 242 } 243 244 /* TODO: integrate with include/asm-generic/pci.h ? */ 245 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
··· 223 /* Nothing to do. */ 224 } 225 226 + #ifdef CONFIG_PCI 227 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 228 enum pci_dma_burst_strategy *strat, 229 unsigned long *strategy_parameter) ··· 239 *strat = PCI_DMA_BURST_BOUNDARY; 240 *strategy_parameter = cacheline_size; 241 } 242 + #endif 243 244 /* TODO: integrate with include/asm-generic/pci.h ? */ 245 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
+2
include/asm-arm/pci.h
··· 42 #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) 43 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) 44 45 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 46 enum pci_dma_burst_strategy *strat, 47 unsigned long *strategy_parameter) ··· 50 *strat = PCI_DMA_BURST_INFINITY; 51 *strategy_parameter = ~0UL; 52 } 53 54 #define HAVE_PCI_MMAP 55 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
··· 42 #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) 43 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) 44 45 + #ifdef CONFIG_PCI 46 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 47 enum pci_dma_burst_strategy *strat, 48 unsigned long *strategy_parameter) ··· 49 *strat = PCI_DMA_BURST_INFINITY; 50 *strategy_parameter = ~0UL; 51 } 52 + #endif 53 54 #define HAVE_PCI_MMAP 55 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+2
include/asm-frv/pci.h
··· 57 */ 58 #define PCI_DMA_BUS_IS_PHYS (1) 59 60 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 61 enum pci_dma_burst_strategy *strat, 62 unsigned long *strategy_parameter) ··· 65 *strat = PCI_DMA_BURST_INFINITY; 66 *strategy_parameter = ~0UL; 67 } 68 69 /* 70 * These are pretty much arbitary with the CoMEM implementation.
··· 57 */ 58 #define PCI_DMA_BUS_IS_PHYS (1) 59 60 + #ifdef CONFIG_PCI 61 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 62 enum pci_dma_burst_strategy *strat, 63 unsigned long *strategy_parameter) ··· 64 *strat = PCI_DMA_BURST_INFINITY; 65 *strategy_parameter = ~0UL; 66 } 67 + #endif 68 69 /* 70 * These are pretty much arbitary with the CoMEM implementation.
+2
include/asm-i386/pci.h
··· 99 { 100 } 101 102 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 103 enum pci_dma_burst_strategy *strat, 104 unsigned long *strategy_parameter) ··· 107 *strat = PCI_DMA_BURST_INFINITY; 108 *strategy_parameter = ~0UL; 109 } 110 111 #endif /* __KERNEL__ */ 112
··· 99 { 100 } 101 102 + #ifdef CONFIG_PCI 103 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 104 enum pci_dma_burst_strategy *strat, 105 unsigned long *strategy_parameter) ··· 106 *strat = PCI_DMA_BURST_INFINITY; 107 *strategy_parameter = ~0UL; 108 } 109 + #endif 110 111 #endif /* __KERNEL__ */ 112
+2
include/asm-ia64/pci.h
··· 82 #define sg_dma_len(sg) ((sg)->dma_length) 83 #define sg_dma_address(sg) ((sg)->dma_address) 84 85 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 86 enum pci_dma_burst_strategy *strat, 87 unsigned long *strategy_parameter) ··· 99 *strat = PCI_DMA_BURST_MULTIPLE; 100 *strategy_parameter = cacheline_size; 101 } 102 103 #define HAVE_PCI_MMAP 104 extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
··· 82 #define sg_dma_len(sg) ((sg)->dma_length) 83 #define sg_dma_address(sg) ((sg)->dma_address) 84 85 + #ifdef CONFIG_PCI 86 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 87 enum pci_dma_burst_strategy *strat, 88 unsigned long *strategy_parameter) ··· 98 *strat = PCI_DMA_BURST_MULTIPLE; 99 *strategy_parameter = cacheline_size; 100 } 101 + #endif 102 103 #define HAVE_PCI_MMAP 104 extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
+2
include/asm-mips/pci.h
··· 130 extern void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, 131 dma64_addr_t dma_addr, size_t len, int direction); 132 133 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 134 enum pci_dma_burst_strategy *strat, 135 unsigned long *strategy_parameter) ··· 138 *strat = PCI_DMA_BURST_INFINITY; 139 *strategy_parameter = ~0UL; 140 } 141 142 extern void pcibios_resource_to_bus(struct pci_dev *dev, 143 struct pci_bus_region *region, struct resource *res);
··· 130 extern void pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, 131 dma64_addr_t dma_addr, size_t len, int direction); 132 133 + #ifdef CONFIG_PCI 134 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 135 enum pci_dma_burst_strategy *strat, 136 unsigned long *strategy_parameter) ··· 137 *strat = PCI_DMA_BURST_INFINITY; 138 *strategy_parameter = ~0UL; 139 } 140 + #endif 141 142 extern void pcibios_resource_to_bus(struct pci_dev *dev, 143 struct pci_bus_region *region, struct resource *res);
+2
include/asm-parisc/pci.h
··· 230 /* export the pci_ DMA API in terms of the dma_ one */ 231 #include <asm-generic/pci-dma-compat.h> 232 233 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 234 enum pci_dma_burst_strategy *strat, 235 unsigned long *strategy_parameter) ··· 247 *strat = PCI_DMA_BURST_MULTIPLE; 248 *strategy_parameter = cacheline_size; 249 } 250 251 extern void 252 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
··· 230 /* export the pci_ DMA API in terms of the dma_ one */ 231 #include <asm-generic/pci-dma-compat.h> 232 233 + #ifdef CONFIG_PCI 234 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 235 enum pci_dma_burst_strategy *strat, 236 unsigned long *strategy_parameter) ··· 246 *strat = PCI_DMA_BURST_MULTIPLE; 247 *strategy_parameter = cacheline_size; 248 } 249 + #endif 250 251 extern void 252 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
+2
include/asm-ppc/pci.h
··· 69 #define pci_unmap_len(PTR, LEN_NAME) (0) 70 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) 71 72 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 73 enum pci_dma_burst_strategy *strat, 74 unsigned long *strategy_parameter) ··· 77 *strat = PCI_DMA_BURST_INFINITY; 78 *strategy_parameter = ~0UL; 79 } 80 81 /* 82 * At present there are very few 32-bit PPC machines that can have
··· 69 #define pci_unmap_len(PTR, LEN_NAME) (0) 70 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) 71 72 + #ifdef CONFIG_PCI 73 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 74 enum pci_dma_burst_strategy *strat, 75 unsigned long *strategy_parameter) ··· 76 *strat = PCI_DMA_BURST_INFINITY; 77 *strategy_parameter = ~0UL; 78 } 79 + #endif 80 81 /* 82 * At present there are very few 32-bit PPC machines that can have
+2
include/asm-ppc64/pci.h
··· 78 return 0; 79 } 80 81 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 82 enum pci_dma_burst_strategy *strat, 83 unsigned long *strategy_parameter) ··· 95 *strat = PCI_DMA_BURST_MULTIPLE; 96 *strategy_parameter = cacheline_size; 97 } 98 99 extern int pci_domain_nr(struct pci_bus *bus); 100
··· 78 return 0; 79 } 80 81 + #ifdef CONFIG_PCI 82 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 83 enum pci_dma_burst_strategy *strat, 84 unsigned long *strategy_parameter) ··· 94 *strat = PCI_DMA_BURST_MULTIPLE; 95 *strategy_parameter = cacheline_size; 96 } 97 + #endif 98 99 extern int pci_domain_nr(struct pci_bus *bus); 100
+2
include/asm-sh/pci.h
··· 96 #define sg_dma_address(sg) (virt_to_bus((sg)->dma_address)) 97 #define sg_dma_len(sg) ((sg)->length) 98 99 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 100 enum pci_dma_burst_strategy *strat, 101 unsigned long *strategy_parameter) ··· 104 *strat = PCI_DMA_BURST_INFINITY; 105 *strategy_parameter = ~0UL; 106 } 107 108 /* Board-specific fixup routines. */ 109 extern void pcibios_fixup(void);
··· 96 #define sg_dma_address(sg) (virt_to_bus((sg)->dma_address)) 97 #define sg_dma_len(sg) ((sg)->length) 98 99 + #ifdef CONFIG_PCI 100 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 101 enum pci_dma_burst_strategy *strat, 102 unsigned long *strategy_parameter) ··· 103 *strat = PCI_DMA_BURST_INFINITY; 104 *strategy_parameter = ~0UL; 105 } 106 + #endif 107 108 /* Board-specific fixup routines. */ 109 extern void pcibios_fixup(void);
+2
include/asm-sh64/pci.h
··· 86 #define sg_dma_address(sg) ((sg)->dma_address) 87 #define sg_dma_len(sg) ((sg)->length) 88 89 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 90 enum pci_dma_burst_strategy *strat, 91 unsigned long *strategy_parameter) ··· 94 *strat = PCI_DMA_BURST_INFINITY; 95 *strategy_parameter = ~0UL; 96 } 97 98 /* Board-specific fixup routines. */ 99 extern void pcibios_fixup(void);
··· 86 #define sg_dma_address(sg) ((sg)->dma_address) 87 #define sg_dma_len(sg) ((sg)->length) 88 89 + #ifdef CONFIG_PCI 90 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 91 enum pci_dma_burst_strategy *strat, 92 unsigned long *strategy_parameter) ··· 93 *strat = PCI_DMA_BURST_INFINITY; 94 *strategy_parameter = ~0UL; 95 } 96 + #endif 97 98 /* Board-specific fixup routines. */ 99 extern void pcibios_fixup(void);
+2
include/asm-sparc/pci.h
··· 144 145 #define pci_dac_dma_supported(dev, mask) (0) 146 147 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 148 enum pci_dma_burst_strategy *strat, 149 unsigned long *strategy_parameter) ··· 152 *strat = PCI_DMA_BURST_INFINITY; 153 *strategy_parameter = ~0UL; 154 } 155 156 static inline void pcibios_add_platform_entries(struct pci_dev *dev) 157 {
··· 144 145 #define pci_dac_dma_supported(dev, mask) (0) 146 147 + #ifdef CONFIG_PCI 148 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 149 enum pci_dma_burst_strategy *strat, 150 unsigned long *strategy_parameter) ··· 151 *strat = PCI_DMA_BURST_INFINITY; 152 *strategy_parameter = ~0UL; 153 } 154 + #endif 155 156 static inline void pcibios_add_platform_entries(struct pci_dev *dev) 157 {
+2
include/asm-sparc64/pci.h
··· 220 return (dma_addr == PCI_DMA_ERROR_CODE); 221 } 222 223 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 224 enum pci_dma_burst_strategy *strat, 225 unsigned long *strategy_parameter) ··· 237 *strat = PCI_DMA_BURST_BOUNDARY; 238 *strategy_parameter = cacheline_size; 239 } 240 241 /* Return the index of the PCI controller for device PDEV. */ 242
··· 220 return (dma_addr == PCI_DMA_ERROR_CODE); 221 } 222 223 + #ifdef CONFIG_PCI 224 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 225 enum pci_dma_burst_strategy *strat, 226 unsigned long *strategy_parameter) ··· 236 *strat = PCI_DMA_BURST_BOUNDARY; 237 *strategy_parameter = cacheline_size; 238 } 239 + #endif 240 241 /* Return the index of the PCI controller for device PDEV. */ 242
+2
include/asm-v850/pci.h
··· 81 pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, 82 dma_addr_t dma_addr); 83 84 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 85 enum pci_dma_burst_strategy *strat, 86 unsigned long *strategy_parameter) ··· 89 *strat = PCI_DMA_BURST_INFINITY; 90 *strategy_parameter = ~0UL; 91 } 92 93 static inline void pcibios_add_platform_entries(struct pci_dev *dev) 94 {
··· 81 pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, 82 dma_addr_t dma_addr); 83 84 + #ifdef CONFIG_PCI 85 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 86 enum pci_dma_burst_strategy *strat, 87 unsigned long *strategy_parameter) ··· 88 *strat = PCI_DMA_BURST_INFINITY; 89 *strategy_parameter = ~0UL; 90 } 91 + #endif 92 93 static inline void pcibios_add_platform_entries(struct pci_dev *dev) 94 {
+2
include/asm-x86_64/pci.h
··· 123 flush_write_buffers(); 124 } 125 126 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 127 enum pci_dma_burst_strategy *strat, 128 unsigned long *strategy_parameter) ··· 131 *strat = PCI_DMA_BURST_INFINITY; 132 *strategy_parameter = ~0UL; 133 } 134 135 #define HAVE_PCI_MMAP 136 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
··· 123 flush_write_buffers(); 124 } 125 126 + #ifdef CONFIG_PCI 127 static inline void pci_dma_burst_advice(struct pci_dev *pdev, 128 enum pci_dma_burst_strategy *strat, 129 unsigned long *strategy_parameter) ··· 130 *strat = PCI_DMA_BURST_INFINITY; 131 *strategy_parameter = ~0UL; 132 } 133 + #endif 134 135 #define HAVE_PCI_MMAP 136 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
+2
include/linux/pci.h
··· 985 } 986 #endif 987 988 #endif /* !CONFIG_PCI */ 989 990 /* these helpers provide future and backwards compatibility
··· 985 } 986 #endif 987 988 + #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) 989 + 990 #endif /* !CONFIG_PCI */ 991 992 /* these helpers provide future and backwards compatibility