aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/pci-base_32.c1
-rw-r--r--include/asm-x86/dma-mapping.h14
-rw-r--r--include/asm-x86/dma-mapping_32.h8
-rw-r--r--include/asm-x86/dma-mapping_64.h12
4 files changed, 15 insertions, 20 deletions
diff --git a/arch/x86/kernel/pci-base_32.c b/arch/x86/kernel/pci-base_32.c
index c501599a4506..4512c307b60c 100644
--- a/arch/x86/kernel/pci-base_32.c
+++ b/arch/x86/kernel/pci-base_32.c
@@ -38,6 +38,7 @@ static const struct dma_mapping_ops pci32_dma_ops = {
38 .sync_single_for_cpu = NULL, 38 .sync_single_for_cpu = NULL,
39 .sync_single_for_device = NULL, 39 .sync_single_for_device = NULL,
40 .sync_single_range_for_cpu = NULL, 40 .sync_single_range_for_cpu = NULL,
41 .sync_single_range_for_device = NULL,
41}; 42};
42 43
43const struct dma_mapping_ops *dma_ops = &pci32_dma_ops; 44const struct dma_mapping_ops *dma_ops = &pci32_dma_ops;
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index a466470f130d..260538b6ce2c 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -125,4 +125,18 @@ dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
125 125
126 flush_write_buffers(); 126 flush_write_buffers();
127} 127}
128
129static inline void
130dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
131 unsigned long offset, size_t size,
132 int direction)
133{
134 BUG_ON(!valid_dma_direction(direction));
135 if (dma_ops->sync_single_range_for_device)
136 dma_ops->sync_single_range_for_device(hwdev, dma_handle,
137 offset, size, direction);
138
139 flush_write_buffers();
140}
141
128#endif 142#endif
diff --git a/include/asm-x86/dma-mapping_32.h b/include/asm-x86/dma-mapping_32.h
index e24c59d76ecb..60d5371c7de7 100644
--- a/include/asm-x86/dma-mapping_32.h
+++ b/include/asm-x86/dma-mapping_32.h
@@ -33,14 +33,6 @@ dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
33} 33}
34 34
35static inline void 35static inline void
36dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
37 unsigned long offset, size_t size,
38 enum dma_data_direction direction)
39{
40 flush_write_buffers();
41}
42
43static inline void
44dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, 36dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
45 enum dma_data_direction direction) 37 enum dma_data_direction direction)
46{ 38{
diff --git a/include/asm-x86/dma-mapping_64.h b/include/asm-x86/dma-mapping_64.h
index 6ecafad1554b..dfa66cc525bc 100644
--- a/include/asm-x86/dma-mapping_64.h
+++ b/include/asm-x86/dma-mapping_64.h
@@ -29,18 +29,6 @@ extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
29#define dma_unmap_page dma_unmap_single 29#define dma_unmap_page dma_unmap_single
30 30
31static inline void 31static inline void
32dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
33 unsigned long offset, size_t size, int direction)
34{
35 BUG_ON(!valid_dma_direction(direction));
36 if (dma_ops->sync_single_range_for_device)
37 dma_ops->sync_single_range_for_device(hwdev, dma_handle,
38 offset, size, direction);
39
40 flush_write_buffers();
41}
42
43static inline void
44dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, 32dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
45 int nelems, int direction) 33 int nelems, int direction)
46{ 34{