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

Configure Feed

Select the types of activity you want to include in your feed.

powerpc: Merge pci.h

This involves some minor changes: a few unused functions that the
ppc32 pci.c provides are no longer declared here or exported;
pcibios_assign_all_busses now just refers to the pci_assign_all_buses
variable on both 32-bit and 64-bit; pcibios_scan_all_fns is now
just 0 instead of a function that always returns 0 on 64-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>

+83 -50
+1 -17
arch/powerpc/kernel/pci_64.c
··· 40 40 #endif 41 41 42 42 unsigned long pci_probe_only = 1; 43 - unsigned long pci_assign_all_buses = 0; 43 + int pci_assign_all_buses = 0; 44 44 45 45 /* 46 46 * legal IO pages under MAX_ISA_PORT. This is to ensure we don't touch ··· 54 54 static void fixup_resource(struct resource *res, struct pci_dev *dev); 55 55 static void do_bus_setup(struct pci_bus *bus); 56 56 #endif 57 - 58 - unsigned int pcibios_assign_all_busses(void) 59 - { 60 - return pci_assign_all_buses; 61 - } 62 57 63 58 /* pci_io_base -- the base address from which io bars are offsets. 64 59 * This is the lowest I/O base address (so bar values are always positive), ··· 1179 1184 1180 1185 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) 1181 1186 remap_bus_range(hose->bus); 1182 - } 1183 - 1184 - /* 1185 - * ppc64 can have multifunction devices that do not respond to function 0. 1186 - * In this case we must scan all functions. 1187 - * XXX this can go now, we use the OF device tree in all the 1188 - * cases that caused problems. -- paulus 1189 - */ 1190 - int pcibios_scan_all_fns(struct pci_bus *bus, int devfn) 1191 - { 1192 - return 0; 1193 1187 } 1194 1188 1195 1189 static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
-3
arch/powerpc/kernel/ppc_ksyms.c
··· 146 146 EXPORT_SYMBOL(pci_bus_io_base_phys); 147 147 EXPORT_SYMBOL(pci_bus_mem_base_phys); 148 148 EXPORT_SYMBOL(pci_bus_to_hose); 149 - EXPORT_SYMBOL(pci_resource_to_bus); 150 - EXPORT_SYMBOL(pci_phys_to_bus); 151 - EXPORT_SYMBOL(pci_bus_to_phys); 152 149 #endif /* CONFIG_PCI */ 153 150 154 151 #ifdef CONFIG_NOT_COHERENT_CACHE
-2
include/asm-powerpc/ppc-pci.h
··· 48 48 extern void pSeries_irq_bus_setup(struct pci_bus *bus); 49 49 50 50 extern unsigned long pci_probe_only; 51 - extern unsigned long pci_assign_all_buses; 52 - extern int pci_read_irq_line(struct pci_dev *pci_dev); 53 51 54 52 /* ---- EEH internal-use-only related routines ---- */ 55 53 #ifdef CONFIG_EEH
+82 -28
include/asm-ppc64/pci.h include/asm-powerpc/pci.h
··· 1 - #ifndef __PPC64_PCI_H 2 - #define __PPC64_PCI_H 1 + #ifndef __ASM_POWERPC_PCI_H 2 + #define __ASM_POWERPC_PCI_H 3 3 #ifdef __KERNEL__ 4 4 5 5 /* ··· 18 18 #include <asm/scatterlist.h> 19 19 #include <asm/io.h> 20 20 #include <asm/prom.h> 21 + #include <asm/pci-bridge.h> 21 22 22 23 #include <asm-generic/pci-dma-compat.h> 23 24 ··· 27 26 28 27 struct pci_dev; 29 28 30 - #ifdef CONFIG_PPC_ISERIES 29 + /* Values for the `which' argument to sys_pciconfig_iobase syscall. */ 30 + #define IOBASE_BRIDGE_NUMBER 0 31 + #define IOBASE_MEMORY 1 32 + #define IOBASE_IO 2 33 + #define IOBASE_ISA_IO 3 34 + #define IOBASE_ISA_MEM 4 35 + 36 + /* 37 + * Set this to 1 if you want the kernel to re-assign all PCI 38 + * bus numbers 39 + */ 40 + extern int pci_assign_all_buses; 41 + #define pcibios_assign_all_busses() (pci_assign_all_buses) 42 + 31 43 #define pcibios_scan_all_fns(a, b) 0 32 - #else 33 - extern int pcibios_scan_all_fns(struct pci_bus *bus, int devfn); 34 - #endif 35 44 36 45 static inline void pcibios_set_master(struct pci_dev *dev) 37 46 { ··· 61 50 return channel ? 15 : 14; 62 51 } 63 52 53 + #ifdef CONFIG_PPC64 64 54 #define HAVE_ARCH_PCI_MWI 1 65 55 static inline int pcibios_prep_mwi(struct pci_dev *dev) 66 56 { ··· 76 64 return 0; 77 65 } 78 66 79 - extern unsigned int pcibios_assign_all_busses(void); 80 - 81 67 extern struct dma_mapping_ops pci_dma_ops; 82 68 83 69 /* For DAC DMA, we currently don't support it by default, but 84 - * we let the platform override this 70 + * we let 64-bit platforms override this. 85 71 */ 86 72 static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) 87 73 { ··· 112 102 /* Decide whether to display the domain number in /proc */ 113 103 extern int pci_proc_domain(struct pci_bus *bus); 114 104 105 + #else /* 32-bit */ 106 + 107 + #ifdef CONFIG_PCI 108 + static inline void pci_dma_burst_advice(struct pci_dev *pdev, 109 + enum pci_dma_burst_strategy *strat, 110 + unsigned long *strategy_parameter) 111 + { 112 + *strat = PCI_DMA_BURST_INFINITY; 113 + *strategy_parameter = ~0UL; 114 + } 115 + #endif 116 + 117 + /* 118 + * At present there are very few 32-bit PPC machines that can have 119 + * memory above the 4GB point, and we don't support that. 120 + */ 121 + #define pci_dac_dma_supported(pci_dev, mask) (0) 122 + 123 + /* Return the index of the PCI controller for device PDEV. */ 124 + #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index 125 + 126 + /* Set the name of the bus as it appears in /proc/bus/pci */ 127 + static inline int pci_proc_domain(struct pci_bus *bus) 128 + { 129 + return 0; 130 + } 131 + 132 + #endif /* CONFIG_PPC64 */ 133 + 115 134 struct vm_area_struct; 116 135 /* Map a range of PCI memory or I/O space for a device into user space */ 117 136 int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma, ··· 149 110 /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */ 150 111 #define HAVE_PCI_MMAP 1 151 112 113 + #ifdef CONFIG_PPC64 152 114 /* pci_unmap_{single,page} is not a nop, thus... */ 153 115 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ 154 116 dma_addr_t ADDR_NAME; ··· 164 124 #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ 165 125 (((PTR)->LEN_NAME) = (VAL)) 166 126 167 - /* The PCI address space does equal the physical memory 168 - * address space. The networking and block device layers use 127 + /* The PCI address space does not equal the physical memory address 128 + * space (we have an IOMMU). The IDE and SCSI device layers use 169 129 * this boolean for bounce buffer decisions. 170 130 */ 171 131 #define PCI_DMA_BUS_IS_PHYS (0) 132 + 133 + #else /* 32-bit */ 134 + 135 + /* The PCI address space does equal the physical memory 136 + * address space (no IOMMU). The IDE and SCSI device layers use 137 + * this boolean for bounce buffer decisions. 138 + */ 139 + #define PCI_DMA_BUS_IS_PHYS (1) 140 + 141 + /* pci_unmap_{page,single} is a nop so... */ 142 + #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) 143 + #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) 144 + #define pci_unmap_addr(PTR, ADDR_NAME) (0) 145 + #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) 146 + #define pci_unmap_len(PTR, LEN_NAME) (0) 147 + #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) 148 + 149 + #endif /* CONFIG_PPC64 */ 172 150 173 - extern void 174 - pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, 151 + extern void pcibios_resource_to_bus(struct pci_dev *dev, 152 + struct pci_bus_region *region, 175 153 struct resource *res); 176 154 177 - extern void 178 - pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, 155 + extern void pcibios_bus_to_resource(struct pci_dev *dev, 156 + struct resource *res, 179 157 struct pci_bus_region *region); 180 158 181 - static inline struct resource * 182 - pcibios_select_root(struct pci_dev *pdev, struct resource *res) 159 + static inline struct resource *pcibios_select_root(struct pci_dev *pdev, 160 + struct resource *res) 183 161 { 184 162 struct resource *root = NULL; 185 163 ··· 209 151 return root; 210 152 } 211 153 212 - extern int 213 - unmap_bus_range(struct pci_bus *bus); 154 + extern int unmap_bus_range(struct pci_bus *bus); 214 155 215 - extern int 216 - remap_bus_range(struct pci_bus *bus); 156 + extern int remap_bus_range(struct pci_bus *bus); 217 157 218 - extern void 219 - pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus); 158 + extern void pcibios_fixup_device_resources(struct pci_dev *dev, 159 + struct pci_bus *bus); 220 160 221 161 extern struct pci_controller *init_phb_dynamic(struct device_node *dn); 222 162 ··· 236 180 unsigned long size, 237 181 pgprot_t prot); 238 182 239 - #ifdef CONFIG_PPC_MULTIPLATFORM 183 + #if defined(CONFIG_PPC_MULTIPLATFORM) || defined(CONFIG_PPC32) 240 184 #define HAVE_ARCH_PCI_RESOURCE_TO_USER 241 185 extern void pci_resource_to_user(const struct pci_dev *dev, int bar, 242 186 const struct resource *rsrc, 243 187 u64 *start, u64 *end); 244 - #endif /* CONFIG_PPC_MULTIPLATFORM */ 245 - 188 + #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ 246 189 247 190 #endif /* __KERNEL__ */ 248 - 249 - #endif /* __PPC64_PCI_H */ 191 + #endif /* __ASM_POWERPC_PCI_H */