Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] [ARM] Add missing include "asm/memory.h"

28 views
Skip to first unread message

Axel Lin

unread,
Dec 17, 2010, 1:10:02 AM12/17/10
to
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 <axel...@gmail.com>
---
arch/arm/include/asm/system.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index ec4327a..3222ab8 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -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)
--
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Peter Huewe

unread,
Dec 19, 2010, 2:20:02 PM12/19/10
to
Am Freitag 17 Dezember 2010, 07:08:29 schrieb 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
>
> Signed-off-by: Axel Lin <axel...@gmail.com>

Looks good - compiles fine on
arm (hackkit_defconfig and ep93xx_defconfig),

Acked-by: Peter Huewe <peter...@gmx.de>

Axel Lin

unread,
Dec 27, 2010, 9:00:02 PM12/27/10
to
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 <axel...@gmail.com>
Acked-by: Peter Huewe <peter...@gmx.de>
---
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(-)

diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index ec4327a..3222ab8 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -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)
--
1.7.2

--

Nick Piggin

unread,
Jan 4, 2011, 1:40:02 AM1/4/11
to
On Tue, Dec 28, 2010 at 09:56:37AM +0800, Axel Lin wrote:
> 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.

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.

0 new messages