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

make sn DMA mapping functions static

Now we don't need to export sn DMA mapping functions.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

FUJITA Tomonori and committed by
Ingo Molnar
cdc28d59 fad6a029

+26 -38
+26 -38
arch/ia64/sn/pci/pci_dma.c
··· 32 32 * this function. Of course, SN only supports devices that have 32 or more 33 33 * address bits when using the PMU. 34 34 */ 35 - int sn_dma_supported(struct device *dev, u64 mask) 35 + static int sn_dma_supported(struct device *dev, u64 mask) 36 36 { 37 37 BUG_ON(dev->bus != &pci_bus_type); 38 38 ··· 40 40 return 0; 41 41 return 1; 42 42 } 43 - EXPORT_SYMBOL(sn_dma_supported); 44 43 45 44 /** 46 45 * sn_dma_set_mask - set the DMA mask ··· 75 76 * queue for a SCSI controller). See Documentation/DMA-API.txt for 76 77 * more information. 77 78 */ 78 - void *sn_dma_alloc_coherent(struct device *dev, size_t size, 79 - dma_addr_t * dma_handle, gfp_t flags) 79 + static void *sn_dma_alloc_coherent(struct device *dev, size_t size, 80 + dma_addr_t * dma_handle, gfp_t flags) 80 81 { 81 82 void *cpuaddr; 82 83 unsigned long phys_addr; ··· 124 125 125 126 return cpuaddr; 126 127 } 127 - EXPORT_SYMBOL(sn_dma_alloc_coherent); 128 128 129 129 /** 130 130 * sn_pci_free_coherent - free memory associated with coherent DMAable region ··· 135 137 * Frees the memory allocated by dma_alloc_coherent(), potentially unmapping 136 138 * any associated IOMMU mappings. 137 139 */ 138 - void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 139 - dma_addr_t dma_handle) 140 + static void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 141 + dma_addr_t dma_handle) 140 142 { 141 143 struct pci_dev *pdev = to_pci_dev(dev); 142 144 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); ··· 146 148 provider->dma_unmap(pdev, dma_handle, 0); 147 149 free_pages((unsigned long)cpu_addr, get_order(size)); 148 150 } 149 - EXPORT_SYMBOL(sn_dma_free_coherent); 150 151 151 152 /** 152 153 * sn_dma_map_single_attrs - map a single page for DMA ··· 171 174 * TODO: simplify our interface; 172 175 * figure out how to save dmamap handle so can use two step. 173 176 */ 174 - dma_addr_t sn_dma_map_single_attrs(struct device *dev, void *cpu_addr, 175 - size_t size, int direction, 176 - struct dma_attrs *attrs) 177 + static dma_addr_t sn_dma_map_single_attrs(struct device *dev, void *cpu_addr, 178 + size_t size, int direction, 179 + struct dma_attrs *attrs) 177 180 { 178 181 dma_addr_t dma_addr; 179 182 unsigned long phys_addr; ··· 199 202 } 200 203 return dma_addr; 201 204 } 202 - EXPORT_SYMBOL(sn_dma_map_single_attrs); 203 205 204 206 /** 205 207 * sn_dma_unmap_single_attrs - unamp a DMA mapped page ··· 212 216 * by @dma_handle into the coherence domain. On SN, we're always cache 213 217 * coherent, so we just need to free any ATEs associated with this mapping. 214 218 */ 215 - void sn_dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, 216 - size_t size, int direction, 217 - struct dma_attrs *attrs) 219 + static void sn_dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, 220 + size_t size, int direction, 221 + struct dma_attrs *attrs) 218 222 { 219 223 struct pci_dev *pdev = to_pci_dev(dev); 220 224 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); ··· 223 227 224 228 provider->dma_unmap(pdev, dma_addr, direction); 225 229 } 226 - EXPORT_SYMBOL(sn_dma_unmap_single_attrs); 227 230 228 231 /** 229 232 * sn_dma_unmap_sg_attrs - unmap a DMA scatterlist ··· 234 239 * 235 240 * Unmap a set of streaming mode DMA translations. 236 241 */ 237 - void sn_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, 238 - int nhwentries, int direction, 239 - struct dma_attrs *attrs) 242 + static void sn_dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, 243 + int nhwentries, int direction, 244 + struct dma_attrs *attrs) 240 245 { 241 246 int i; 242 247 struct pci_dev *pdev = to_pci_dev(dev); ··· 251 256 sg->dma_length = 0; 252 257 } 253 258 } 254 - EXPORT_SYMBOL(sn_dma_unmap_sg_attrs); 255 259 256 260 /** 257 261 * sn_dma_map_sg_attrs - map a scatterlist for DMA ··· 267 273 * 268 274 * Maps each entry of @sg for DMA. 269 275 */ 270 - int sn_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, 271 - int nhwentries, int direction, struct dma_attrs *attrs) 276 + static int sn_dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, 277 + int nhwentries, int direction, struct dma_attrs *attrs) 272 278 { 273 279 unsigned long phys_addr; 274 280 struct scatterlist *saved_sg = sgl, *sg; ··· 315 321 316 322 return nhwentries; 317 323 } 318 - EXPORT_SYMBOL(sn_dma_map_sg_attrs); 319 324 320 - void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, 321 - size_t size, int direction) 325 + static void sn_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, 326 + size_t size, int direction) 322 327 { 323 328 BUG_ON(dev->bus != &pci_bus_type); 324 329 } 325 - EXPORT_SYMBOL(sn_dma_sync_single_for_cpu); 326 330 327 - void sn_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, 328 - size_t size, int direction) 331 + static void sn_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, 332 + size_t size, int direction) 329 333 { 330 334 BUG_ON(dev->bus != &pci_bus_type); 331 335 } 332 - EXPORT_SYMBOL(sn_dma_sync_single_for_device); 333 336 334 - void sn_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, 335 - int nelems, int direction) 337 + static void sn_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, 338 + int nelems, int direction) 336 339 { 337 340 BUG_ON(dev->bus != &pci_bus_type); 338 341 } 339 - EXPORT_SYMBOL(sn_dma_sync_sg_for_cpu); 340 342 341 - void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, 342 - int nelems, int direction) 343 + static void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, 344 + int nelems, int direction) 343 345 { 344 346 BUG_ON(dev->bus != &pci_bus_type); 345 347 } 346 - EXPORT_SYMBOL(sn_dma_sync_sg_for_device); 347 348 348 - int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 349 + static int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 349 350 { 350 351 return 0; 351 352 } 352 - EXPORT_SYMBOL(sn_dma_mapping_error); 353 353 354 354 char *sn_pci_get_legacy_mem(struct pci_bus *bus) 355 355 { ··· 455 467 return ret; 456 468 } 457 469 458 - struct dma_mapping_ops sn_dma_ops = { 470 + static struct dma_mapping_ops sn_dma_ops = { 459 471 .alloc_coherent = sn_dma_alloc_coherent, 460 472 .free_coherent = sn_dma_free_coherent, 461 473 .map_single_attrs = sn_dma_map_single_attrs,