Skip to contentSkip to conversation

Add missing include "asm/memory.h"

PATCH RESEND Superseded Axel Lin 3 participants 4 messages Dec 28, 2010 – Jan 4, 2011 Arm (32-bit)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/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

---
It was posted on https://lkml.org/lkml/2010/12/17/9 . I still have the build error for today's linux-next tree. CC Eric Miao, maybe he will take this patch.

Axel

 arch/arm/include/asm/system.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/system.h +1 -0
index ec4327a..3222ab8 100644
@@ -155,6 +155,7 @@ extern unsigned int user_debug;
 #define rmb()		dmb()
 #define wmb()		mb()
 #else
+#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)
Signature · 1 line
1.7.2
#1 lore raw

PATCH RESEND 1/1 Add missing include "asm/memory.h"

Quoted 15 lines · Axel Lin

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
Quoted 6 lines

---
It was posted on https://lkml.org/lkml/2010/12/17/9 . I still have the build error for today's linux-next tree. CC Eric Miao, maybe he will take this patch.

Normal practice is to send patches _to_ someone (or some group of people), and CC interested parties. (It's even more important with pull requests, so that the person who should pull knows that's the case.)

Patch is fine, but please throw it into my patch system, thanks.

author
#2 lore raw

PATCH RESEND 1/1 Add missing include "asm/memory.h"

Quoted 2 lines

Patch is fine, but please throw it into my patch system, thanks.

hi Russell,
The patch is upload to your patch system now.

Regards,
Axel

#3 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

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

This is the right approach, but needs to go through ARM tree.

Quoted 29 lines
$ 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

---
It was posted on https://lkml.org/lkml/2010/12/17/9 . I still have the build error for today's linux-next tree. CC Eric Miao, maybe he will take this patch.

Axel

 arch/arm/include/asm/system.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/system.h +0 -0
index ec4327a..3222ab8 100644

arch/arm/include/asm/system.h extern unsigned int user_debug; · line 161

Quoted 7 lines
arch/arm/include/asm/system.h +1 -0
@@ -155,6 +155,7 @@ extern unsigned int user_debug;
 #define rmb()		dmb()
 #define wmb()		mb()
 #else
+#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)

Is this matching ARM convention to pull includes down here. It usually ends up with more elusive dependency problems and strange bugs (eg. some headers define intermediate symbols for convenience and then undef them sometime later etc etc). Usual thing to avoid problems is to move includes up to the top.