diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-01 12:17:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-01 14:36:17 -0500 |
commit | 50cec5c51c18301ff60262fdbe920f4a907c9d81 (patch) | |
tree | cb913edb32faf80bf5bfaa9c69d3ca42141c5c15 | |
parent | f6d2e6f57bba66272b28dd20c949b14ce39cb804 (diff) |
x86: fix dma_mapping_error for 32bit x86, cleanup
This removes ifdef CONFIG_X86_64 in dma_mapping_error():
1) Xen people plan to use swiotlb on X86_32 for Dom0 support. swiotlb
uses ops->mapping_error so X86_32 also needs to check
ops->mapping_error.
2) Removing #ifdef hack is almost always a good thing.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 097794ff6b79..dc22c0733282 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -71,12 +71,10 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) | |||
71 | /* Make sure we keep the same behaviour */ | 71 | /* Make sure we keep the same behaviour */ |
72 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 72 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
73 | { | 73 | { |
74 | #ifdef CONFIG_X86_64 | ||
75 | struct dma_mapping_ops *ops = get_dma_ops(dev); | 74 | struct dma_mapping_ops *ops = get_dma_ops(dev); |
76 | if (ops->mapping_error) | 75 | if (ops->mapping_error) |
77 | return ops->mapping_error(dev, dma_addr); | 76 | return ops->mapping_error(dev, dma_addr); |
78 | 77 | ||
79 | #endif | ||
80 | return (dma_addr == bad_dma_address); | 78 | return (dma_addr == bad_dma_address); |
81 | } | 79 | } |
82 | 80 | ||