diff options
-rw-r--r-- | drivers/pci/intel-iommu.c | 29 | ||||
-rw-r--r-- | include/linux/intel-iommu.h | 9 |
2 files changed, 11 insertions, 27 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 59de56304aa6..628f8b72e530 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -2283,13 +2283,6 @@ static dma_addr_t intel_map_page(struct device *dev, struct page *page, | |||
2283 | dir, to_pci_dev(dev)->dma_mask); | 2283 | dir, to_pci_dev(dev)->dma_mask); |
2284 | } | 2284 | } |
2285 | 2285 | ||
2286 | dma_addr_t intel_map_single(struct device *hwdev, phys_addr_t paddr, | ||
2287 | size_t size, int dir) | ||
2288 | { | ||
2289 | return __intel_map_single(hwdev, paddr, size, dir, | ||
2290 | to_pci_dev(hwdev)->dma_mask); | ||
2291 | } | ||
2292 | |||
2293 | static void flush_unmaps(void) | 2286 | static void flush_unmaps(void) |
2294 | { | 2287 | { |
2295 | int i, j; | 2288 | int i, j; |
@@ -2397,14 +2390,14 @@ static void intel_unmap_page(struct device *dev, dma_addr_t dev_addr, | |||
2397 | } | 2390 | } |
2398 | } | 2391 | } |
2399 | 2392 | ||
2400 | void intel_unmap_single(struct device *dev, dma_addr_t dev_addr, size_t size, | 2393 | static void intel_unmap_single(struct device *dev, dma_addr_t dev_addr, size_t size, |
2401 | int dir) | 2394 | int dir) |
2402 | { | 2395 | { |
2403 | intel_unmap_page(dev, dev_addr, size, dir, NULL); | 2396 | intel_unmap_page(dev, dev_addr, size, dir, NULL); |
2404 | } | 2397 | } |
2405 | 2398 | ||
2406 | void *intel_alloc_coherent(struct device *hwdev, size_t size, | 2399 | static void *intel_alloc_coherent(struct device *hwdev, size_t size, |
2407 | dma_addr_t *dma_handle, gfp_t flags) | 2400 | dma_addr_t *dma_handle, gfp_t flags) |
2408 | { | 2401 | { |
2409 | void *vaddr; | 2402 | void *vaddr; |
2410 | int order; | 2403 | int order; |
@@ -2427,8 +2420,8 @@ void *intel_alloc_coherent(struct device *hwdev, size_t size, | |||
2427 | return NULL; | 2420 | return NULL; |
2428 | } | 2421 | } |
2429 | 2422 | ||
2430 | void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr, | 2423 | static void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr, |
2431 | dma_addr_t dma_handle) | 2424 | dma_addr_t dma_handle) |
2432 | { | 2425 | { |
2433 | int order; | 2426 | int order; |
2434 | 2427 | ||
@@ -2441,9 +2434,9 @@ void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr, | |||
2441 | 2434 | ||
2442 | #define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg))) | 2435 | #define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg))) |
2443 | 2436 | ||
2444 | void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist, | 2437 | static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist, |
2445 | int nelems, enum dma_data_direction dir, | 2438 | int nelems, enum dma_data_direction dir, |
2446 | struct dma_attrs *attrs) | 2439 | struct dma_attrs *attrs) |
2447 | { | 2440 | { |
2448 | int i; | 2441 | int i; |
2449 | struct pci_dev *pdev = to_pci_dev(hwdev); | 2442 | struct pci_dev *pdev = to_pci_dev(hwdev); |
@@ -2500,8 +2493,8 @@ static int intel_nontranslate_map_sg(struct device *hddev, | |||
2500 | return nelems; | 2493 | return nelems; |
2501 | } | 2494 | } |
2502 | 2495 | ||
2503 | int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int nelems, | 2496 | static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int nelems, |
2504 | enum dma_data_direction dir, struct dma_attrs *attrs) | 2497 | enum dma_data_direction dir, struct dma_attrs *attrs) |
2505 | { | 2498 | { |
2506 | void *addr; | 2499 | void *addr; |
2507 | int i; | 2500 | int i; |
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index a254db1decd0..43412aeddb53 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
@@ -330,13 +330,4 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, | |||
330 | 330 | ||
331 | extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); | 331 | extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); |
332 | 332 | ||
333 | extern void *intel_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t); | ||
334 | extern void intel_free_coherent(struct device *, size_t, void *, dma_addr_t); | ||
335 | extern dma_addr_t intel_map_single(struct device *, phys_addr_t, size_t, int); | ||
336 | extern void intel_unmap_single(struct device *, dma_addr_t, size_t, int); | ||
337 | extern int intel_map_sg(struct device *, struct scatterlist *, int, | ||
338 | enum dma_data_direction, struct dma_attrs *); | ||
339 | extern void intel_unmap_sg(struct device *, struct scatterlist *, int, | ||
340 | enum dma_data_direction, struct dma_attrs *); | ||
341 | |||
342 | #endif | 333 | #endif |