uml: fix compile error in dma_get_cache_alignment()
PATCH 1/1 uml: fix compile error in dma_get_cache_alignment()
From: Miklos Szeredi <[email protected]>
Fix uml compile error:
include/linux/dma-mapping.h:145: error: redefinition of 'dma_get_cache_alignment' /store/git/linux-2.6/arch/um/include/asm/dma-mapping.h:99: note: previous definition of 'dma_get_cache_alignment' was here
Introduced by this commit:
commit 4565f0170dfc849b3629c27d769db800467baa62
Author: FUJITA Tomonori <[email protected]> Date: Tue Aug 10 18:03:22 2010 -0700
dma-mapping: unify dma_get_cache_alignment implementations
--- arch/um/include/asm/dma-mapping.h | 7 ------- 1 file changed, 7 deletions(-)
arch/um/include/asm/dma-mapping.h +0 -7
@@ -95,13 +95,6 @@ dma_sync_sg_for_cpu(struct device *dev,#define dma_alloc_noncoherent (d, s, h, f) dma_alloc_coherent(d, s, h, f)#define dma_free_noncoherent (d, s, v, h) dma_free_coherent(d, s, v, h) -static inline int -dma_get_cache_alignment (void ) -{ -BUG (); -return (0 ); -} -static inline void dma_cache_sync (struct device *dev,void *vaddr,size_t size,enum dma_data_direction direction)
Quoted 7 lines · On Thu, 12 Aug 2010 11:04:35 +0200 Miklos Szeredi <[email protected]> wrote:
From: Miklos Szeredi <[email protected]>
Fix uml compile error:
include/linux/dma-mapping.h:145: error: redefinition of 'dma_get_cache_alignment' /store/git/linux-2.6/arch/um/include/asm/dma-mapping.h:99: note: previous definition of 'dma_get_cache_alignment' was here
Quoted 7 lines
Introduced by this commit:
commit
4565f0170dfc849b3629c27d769db800467baa62Author: FUJITA Tomonori <[email protected]> Date: Tue Aug 10 18:03:22 2010 -0700dma-mapping: unify
dma_get_cache_alignmentimplementations
Very sorry about that.
Quoted 10 lines
Signed-off-by Miklos Szeredi <[email protected]>--- arch/um/include/asm/dma-mapping.h | 7 ------- 1 file changed, 7 deletions(-)Index:
linux-2.6/arch/um/include/asm/dma-mapping.h
===================================================================
arch/um/include/asm/dma-mapping.h dma_sync_sg_for_cpu(struct device *dev, · line 104
Quoted 10 lines
arch/um/include/asm/dma-mapping.h +0
-7@@ -95,13 +95,6 @@ dma_sync_sg_for_cpu(struct device *dev,#define dma_alloc_noncoherent (d, s, h, f) dma_alloc_coherent(d, s, h, f)#define dma_free_noncoherent (d, s, v, h) dma_free_coherent(d, s, v, h) -static inline int -dma_get_cache_alignment (void ) -{ -BUG (); -return (0 ); -} -
this isn't strictly correct for uml, right? dma_get_cache_alignment() should fail on uml, I suppose.
Can we treat uml like other !HAS_DMA architectures? That is, why does uml need the own DMA API that just calls BUG()?
arch/um/Kconfig.um +3 -0
@@ -147,3 +147,6 @@ config KERNEL_STACK_ORDER This option determines the size of UML kernel stacks. They will be 1 << order pages. The default is OK unless you're running Valgrind on UML, in which case, set this to 3. + +config HAS_DMA + def_bool n
arch/um/defconfig +0 -1
@@ -566,7 +566,6 @@ CONFIG_CRC32=m # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_PLIST=y -CONFIG_HAS_DMA=y # # SCSI device support
arch/um/include/asm/dma-mapping.h deleted +0 -119
119 lines not on this page · raw message