diff options
author | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2008-11-29 13:46:27 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-29 21:00:38 +0100 |
commit | 7b1dedca42ac0d0d0be01e39d8461bb53a2389b3 (patch) | |
tree | 2a2d2d37002a7614ceff8065fb362c4a820f5a1c /arch/x86 | |
parent | b627c8b17ccacba38c975bc0f69a49fc4e5261c9 (diff) |
x86: fix dma_mapping_error for 32bit x86
Devices like b44 ethernet can't dma from addresses above 1GB. The driver
handles this cases by falling back to GFP_DMA allocation. But for detecting
the problem it needs to get an indication from dma_mapping_error.
The bug is triggered by using a VMSPLIT option of 2G/2G.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 7f225a4b2a26..097794ff6b79 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -71,15 +71,13 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) /* Make sure we keep the same behaviour */ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) { -#ifdef CONFIG_X86_32 - return 0; -#else +#ifdef CONFIG_X86_64 struct dma_mapping_ops *ops = get_dma_ops(dev); if (ops->mapping_error) return ops->mapping_error(dev, dma_addr); - return (dma_addr == bad_dma_address); #endif + return (dma_addr == bad_dma_address); } #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |