diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-03-25 17:36:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:56 -0400 |
commit | 713623326c816b145105769f174ec237815e53f1 (patch) | |
tree | 6b16529f933ead01809a066201763bd828cc91a0 /include | |
parent | 627610fcb70164991ed0d11110a56c43b15b9312 (diff) |
x86: move dma_sync_single_range_for_device to common header
i386 gets an empty function.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/dma-mapping.h | 14 | ||||
-rw-r--r-- | include/asm-x86/dma-mapping_32.h | 8 | ||||
-rw-r--r-- | include/asm-x86/dma-mapping_64.h | 12 |
3 files changed, 14 insertions, 20 deletions
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 | |||
129 | static inline void | ||
130 | dma_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 | ||
35 | static inline void | 35 | static inline void |
36 | dma_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 | |||
43 | static inline void | ||
44 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | 36 | dma_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 | ||
31 | static inline void | 31 | static inline void |
32 | dma_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 | |||
43 | static inline void | ||
44 | dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, | 32 | dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, |
45 | int nelems, int direction) | 33 | int nelems, int direction) |
46 | { | 34 | { |