diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-03-25 17:36:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:57 -0400 |
commit | b7107a3d9da2e122fb7f33dd1482254ff40fdf96 (patch) | |
tree | bc8169295d26a7e6f49b16a3688846e4f0841347 /include/asm-x86 | |
parent | ae17a63b096b05007bacafd2f92414b881a0b4b4 (diff) |
x86: delete the arch-specific dma-mapping headers.
all the code that is left is ready to be merged as-is
in dma-mapping.h.
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/asm-x86')
-rw-r--r-- | include/asm-x86/dma-mapping.h | 19 | ||||
-rw-r--r-- | include/asm-x86/dma-mapping_32.h | 23 | ||||
-rw-r--r-- | include/asm-x86/dma-mapping_64.h | 17 |
3 files changed, 13 insertions, 46 deletions
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h index 1c88ce6b50d6..914846d0beaa 100644 --- a/include/asm-x86/dma-mapping.h +++ b/include/asm-x86/dma-mapping.h | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <asm/swiotlb.h> | 11 | #include <asm/swiotlb.h> |
12 | 12 | ||
13 | extern dma_addr_t bad_dma_address; | 13 | extern dma_addr_t bad_dma_address; |
14 | extern int iommu_merge; | ||
15 | extern struct device fallback_dev; | ||
16 | extern int panic_on_overflow; | ||
14 | 17 | ||
15 | struct dma_mapping_ops { | 18 | struct dma_mapping_ops { |
16 | int (*mapping_error)(dma_addr_t dma_addr); | 19 | int (*mapping_error)(dma_addr_t dma_addr); |
@@ -75,12 +78,6 @@ void dma_free_coherent(struct device *dev, size_t size, | |||
75 | extern int dma_supported(struct device *hwdev, u64 mask); | 78 | extern int dma_supported(struct device *hwdev, u64 mask); |
76 | extern int dma_set_mask(struct device *dev, u64 mask); | 79 | extern int dma_set_mask(struct device *dev, u64 mask); |
77 | 80 | ||
78 | #ifdef CONFIG_X86_32 | ||
79 | # include "dma-mapping_32.h" | ||
80 | #else | ||
81 | # include "dma-mapping_64.h" | ||
82 | #endif | ||
83 | |||
84 | static inline dma_addr_t | 81 | static inline dma_addr_t |
85 | dma_map_single(struct device *hwdev, void *ptr, size_t size, | 82 | dma_map_single(struct device *hwdev, void *ptr, size_t size, |
86 | int direction) | 83 | int direction) |
@@ -205,6 +202,15 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size, | |||
205 | flush_write_buffers(); | 202 | flush_write_buffers(); |
206 | } | 203 | } |
207 | 204 | ||
205 | static inline int dma_get_cache_alignment(void) | ||
206 | { | ||
207 | /* no easy way to get cache size on all x86, so return the | ||
208 | * maximum possible, to be safe */ | ||
209 | return boot_cpu_data.x86_clflush_size; | ||
210 | } | ||
211 | |||
212 | #define dma_is_consistent(d, h) (1) | ||
213 | |||
208 | #ifdef CONFIG_X86_32 | 214 | #ifdef CONFIG_X86_32 |
209 | # define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | 215 | # define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY |
210 | extern int | 216 | extern int |
@@ -217,5 +223,6 @@ dma_release_declared_memory(struct device *dev); | |||
217 | extern void * | 223 | extern void * |
218 | dma_mark_declared_memory_occupied(struct device *dev, | 224 | dma_mark_declared_memory_occupied(struct device *dev, |
219 | dma_addr_t device_addr, size_t size); | 225 | dma_addr_t device_addr, size_t size); |
226 | extern int forbid_dac; | ||
220 | #endif /* CONFIG_X86_32 */ | 227 | #endif /* CONFIG_X86_32 */ |
221 | #endif | 228 | #endif |
diff --git a/include/asm-x86/dma-mapping_32.h b/include/asm-x86/dma-mapping_32.h deleted file mode 100644 index 4ec4f45446cf..000000000000 --- a/include/asm-x86/dma-mapping_32.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _ASM_I386_DMA_MAPPING_H | ||
2 | #define _ASM_I386_DMA_MAPPING_H | ||
3 | |||
4 | #include <linux/mm.h> | ||
5 | #include <linux/scatterlist.h> | ||
6 | |||
7 | #include <asm/cache.h> | ||
8 | #include <asm/io.h> | ||
9 | #include <asm/bug.h> | ||
10 | |||
11 | extern int forbid_dac; | ||
12 | |||
13 | static inline int | ||
14 | dma_get_cache_alignment(void) | ||
15 | { | ||
16 | /* no easy way to get cache size on all x86, so return the | ||
17 | * maximum possible, to be safe */ | ||
18 | return boot_cpu_data.x86_clflush_size; | ||
19 | } | ||
20 | |||
21 | #define dma_is_consistent(d, h) (1) | ||
22 | |||
23 | #endif | ||
diff --git a/include/asm-x86/dma-mapping_64.h b/include/asm-x86/dma-mapping_64.h deleted file mode 100644 index 8353025f052d..000000000000 --- a/include/asm-x86/dma-mapping_64.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _X8664_DMA_MAPPING_H | ||
2 | #define _X8664_DMA_MAPPING_H 1 | ||
3 | |||
4 | extern int iommu_merge; | ||
5 | |||
6 | /* same for gart, swiotlb, and nommu */ | ||
7 | static inline int dma_get_cache_alignment(void) | ||
8 | { | ||
9 | return boot_cpu_data.x86_clflush_size; | ||
10 | } | ||
11 | |||
12 | #define dma_is_consistent(d, h) 1 | ||
13 | |||
14 | extern struct device fallback_dev; | ||
15 | extern int panic_on_overflow; | ||
16 | |||
17 | #endif /* _X8664_DMA_MAPPING_H */ | ||