diff options
Diffstat (limited to 'lib/swiotlb.c')
| -rw-r--r-- | lib/swiotlb.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 437eedb5a53b..a009055140ec 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/ctype.h> | 29 | #include <linux/ctype.h> |
| 30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
| 31 | #include <linux/gfp.h> | ||
| 31 | 32 | ||
| 32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
| 33 | #include <asm/dma.h> | 34 | #include <asm/dma.h> |
| @@ -756,37 +757,6 @@ swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, | |||
| 756 | EXPORT_SYMBOL(swiotlb_sync_single_for_device); | 757 | EXPORT_SYMBOL(swiotlb_sync_single_for_device); |
| 757 | 758 | ||
| 758 | /* | 759 | /* |
| 759 | * Same as above, but for a sub-range of the mapping. | ||
| 760 | */ | ||
| 761 | static void | ||
| 762 | swiotlb_sync_single_range(struct device *hwdev, dma_addr_t dev_addr, | ||
| 763 | unsigned long offset, size_t size, | ||
| 764 | int dir, int target) | ||
| 765 | { | ||
| 766 | swiotlb_sync_single(hwdev, dev_addr + offset, size, dir, target); | ||
| 767 | } | ||
| 768 | |||
| 769 | void | ||
| 770 | swiotlb_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dev_addr, | ||
| 771 | unsigned long offset, size_t size, | ||
| 772 | enum dma_data_direction dir) | ||
| 773 | { | ||
| 774 | swiotlb_sync_single_range(hwdev, dev_addr, offset, size, dir, | ||
| 775 | SYNC_FOR_CPU); | ||
| 776 | } | ||
| 777 | EXPORT_SYMBOL_GPL(swiotlb_sync_single_range_for_cpu); | ||
| 778 | |||
| 779 | void | ||
| 780 | swiotlb_sync_single_range_for_device(struct device *hwdev, dma_addr_t dev_addr, | ||
| 781 | unsigned long offset, size_t size, | ||
| 782 | enum dma_data_direction dir) | ||
| 783 | { | ||
| 784 | swiotlb_sync_single_range(hwdev, dev_addr, offset, size, dir, | ||
| 785 | SYNC_FOR_DEVICE); | ||
| 786 | } | ||
| 787 | EXPORT_SYMBOL_GPL(swiotlb_sync_single_range_for_device); | ||
| 788 | |||
| 789 | /* | ||
| 790 | * Map a set of buffers described by scatterlist in streaming mode for DMA. | 760 | * Map a set of buffers described by scatterlist in streaming mode for DMA. |
| 791 | * This is the scatter-gather version of the above swiotlb_map_page | 761 | * This is the scatter-gather version of the above swiotlb_map_page |
| 792 | * interface. Here the scatter gather list elements are each tagged with the | 762 | * interface. Here the scatter gather list elements are each tagged with the |
