ARM: 6605/1: Add missing include "asm/memory.h" [Linux 2.6.37]

This Linux kernel change "ARM: 6605/1: Add missing include “asm/memory.h”" is included in the Linux 2.6.37 release. This change is authored by Axel Lin <axel.lin [at]> on Mon Jan 3 02:26:53 2011 +0100. The commit for this change in Linux stable tree is 7c0ab43 (patch).

ARM: 6605/1: Add missing include "asm/memory.h"

This patch fixes below build error by adding the missing asm/memory.h,
which is needed for arch_is_coherent().

$ make pxa3xx_defconfig; make
  CC      init/do_mounts_rd.o
In file included from include/linux/list_bl.h:5,
                 from include/linux/rculist_bl.h:7,
                 from include/linux/dcache.h:7,
                 from include/linux/fs.h:381,
                 from init/do_mounts_rd.c:3:
include/linux/bit_spinlock.h: In function 'bit_spin_unlock':
include/linux/bit_spinlock.h:61: error: implicit declaration of function 'arch_is_coherent'
make[1]: *** [init/do_mounts_rd.o] Error 1
make: *** [init] Error 2

Signed-off-by: Axel Lin <>
Acked-by: Peter Huewe <>
Signed-off-by: Russell King <>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/arm/include/asm/system.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 1120f18..8002594 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -150,6 +150,7 @@ void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int,
 #define rmb()      dmb()
 #define wmb()      mb()
+#include <asm/memory.h>
 #define mb()   do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
 #define rmb()  do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)
 #define wmb()  do { if (arch_is_coherent()) dmb(); else barrier(); } while (0)

Leave a Reply

Your email address will not be published. Required fields are marked *