Skip to contentSkip to conversation

m68knommu: dma_{alloc,free}_coherent compile error

DISCUSSION Adrian Bunk 2 participants 2 messages Sep 5, 2006 – Sep 11, 2006

lore
Share & tools
lore
#0 lore raw

I'm getting the following compile error trying to compile 2.6.18-rc5-mm1 (but it doesn't seem to be specific to -mm) for m68knommu with CONFIG_PCI=n (with -Werror-implicit-function-declaration):

<-- snip -->

...
CC drivers/base/dmapool.o
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c: In function 'pool_alloc_page':
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c:170: error: implicit declaration of function 'dma_alloc_coherent' /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c:173: warning: assignment makes pointer from integer without a cast /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c: In function 'pool_free_page':
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c:208: error: implicit declaration of function 'dma_free_coherent' make[3]: *** [drivers/base/dmapool.o] Error 1

<-- snip -->

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#1 lore raw

Hi Adrian,

Quoted 13 lines · Adrian Bunk

I'm getting the following compile error trying to compile 2.6.18-rc5-mm1 (but it doesn't seem to be specific to -mm) for m68knommu with CONFIG_PCI=n (with -Werror-implicit-function-declaration):

<-- snip -->

...
CC drivers/base/dmapool.o
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c: In function 'pool_alloc_page':
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c:170: error: implicit declaration of function 'dma_alloc_coherent' /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c:173: warning: assignment makes pointer from integer without a cast /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c: In function 'pool_free_page':
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/base/dmapool.c:208: error: implicit declaration of function 'dma_free_coherent' make[3]: *** [drivers/base/dmapool.o] Error 1

Quoted 1 line

<-- snip -->

This should fix it?

include/asm-m68knommu/dma-mapping.h 2006-09-11 15:51:04.000000000 +1000 renamed from include/asm-m68knommu/dma-mapping.h 2006-06-18 11:49:35.000000000 +1000 +2 -2
@@ -1,10 +1,10 @@
 #ifndef _M68KNOMMU_DMA_MAPPING_H
 #define _M68KNOMMU_DMA_MAPPING_H
 
-#include <linux/config.h>
-
 #ifdef CONFIG_PCI
 #include <asm-generic/dma-mapping.h>
+#else
+#include <asm-generic/dma-mapping-broken.h>
 #endif
 
 #endif  /* _M68KNOMMU_DMA_MAPPING_H */
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [email protected]
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com