Commit 30fd6427 authored by Christoph Hellwig's avatar Christoph Hellwig

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: default avatarChristoph Hellwig <hch@lst.de>
parent 09230cbc
...@@ -692,7 +692,6 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, ...@@ -692,7 +692,6 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr,
} }
} }
#ifdef CONFIG_DMA_DIRECT_OPS
static inline bool dma_coherent_ok(struct device *dev, dma_addr_t addr, static inline bool dma_coherent_ok(struct device *dev, dma_addr_t addr,
size_t size) size_t size)
{ {
...@@ -764,7 +763,6 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size, ...@@ -764,7 +763,6 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size,
DMA_ATTR_SKIP_CPU_SYNC); DMA_ATTR_SKIP_CPU_SYNC);
return true; return true;
} }
#endif
static void static void
swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir, 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,7 +1043,6 @@ swiotlb_dma_supported(struct device *hwdev, u64 mask)
return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask; return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask;
} }
#ifdef CONFIG_DMA_DIRECT_OPS
void *swiotlb_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, void *swiotlb_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
gfp_t gfp, unsigned long attrs) gfp_t gfp, unsigned long attrs)
{ {
...@@ -1089,4 +1086,3 @@ const struct dma_map_ops swiotlb_dma_ops = { ...@@ -1089,4 +1086,3 @@ const struct dma_map_ops swiotlb_dma_ops = {
.unmap_page = swiotlb_unmap_page, .unmap_page = swiotlb_unmap_page,
.dma_supported = dma_direct_supported, .dma_supported = dma_direct_supported,
}; };
#endif /* CONFIG_DMA_DIRECT_OPS */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment