diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-12 01:49:51 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-09 00:58:11 -0400 |
commit | 30fd642758773eb034b1543db26cf730ce12795c (patch) | |
tree | d7b5426406537cd4cb4cd8773720fa7dc62cfbac | |
parent | 09230cbc1baba68e0ca1e7c489344ce5d35c6f27 (diff) |
swiotlb: remove the CONFIG_DMA_DIRECT_OPS ifdefs
swiotlb now selects the DMA_DIRECT_OPS config symbol, so this will
always be true.
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | lib/swiotlb.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index bd1e0c5ba1b8..69c732c23773 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -692,7 +692,6 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, | |||
692 | } | 692 | } |
693 | } | 693 | } |
694 | 694 | ||
695 | #ifdef CONFIG_DMA_DIRECT_OPS | ||
696 | static inline bool dma_coherent_ok(struct device *dev, dma_addr_t addr, | 695 | static inline bool dma_coherent_ok(struct device *dev, dma_addr_t addr, |
697 | size_t size) | 696 | size_t size) |
698 | { | 697 | { |
@@ -764,7 +763,6 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size, | |||
764 | DMA_ATTR_SKIP_CPU_SYNC); | 763 | DMA_ATTR_SKIP_CPU_SYNC); |
765 | return true; | 764 | return true; |
766 | } | 765 | } |
767 | #endif | ||
768 | 766 | ||
769 | static void | 767 | static void |
770 | swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir, | 768 | swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir, |
@@ -1045,7 +1043,6 @@ swiotlb_dma_supported(struct device *hwdev, u64 mask) | |||
1045 | return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask; | 1043 | return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask; |
1046 | } | 1044 | } |
1047 | 1045 | ||
1048 | #ifdef CONFIG_DMA_DIRECT_OPS | ||
1049 | void *swiotlb_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, | 1046 | void *swiotlb_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, |
1050 | gfp_t gfp, unsigned long attrs) | 1047 | gfp_t gfp, unsigned long attrs) |
1051 | { | 1048 | { |
@@ -1089,4 +1086,3 @@ const struct dma_map_ops swiotlb_dma_ops = { | |||
1089 | .unmap_page = swiotlb_unmap_page, | 1086 | .unmap_page = swiotlb_unmap_page, |
1090 | .dma_supported = dma_direct_supported, | 1087 | .dma_supported = dma_direct_supported, |
1091 | }; | 1088 | }; |
1092 | #endif /* CONFIG_DMA_DIRECT_OPS */ | ||