* [PATCH] ARM: fix missing 'cpu_relax()' declaration
@ 2011-05-23 13:33 Marc Zyngier
2011-05-23 16:09 ` Russell King - ARM Linux
0 siblings, 1 reply; 8+ messages in thread
From: Marc Zyngier @ 2011-05-23 13:33 UTC (permalink / raw)
To: linux-arm-kernel
ARM build fails with the following symptom:
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/spinlock.h: In function 'spin_unlock_wait':
include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Fix it by including <asm/processor.h>.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/include/asm/spinlock.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index fdd3820..65fa3c8 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -5,6 +5,8 @@
#error SMP not supported on pre-ARMv6 CPUs
#endif
+#include <asm/processor.h>
+
/*
* sev and wfe are ARMv6K extensions. Uniprocessor ARMv6 may not have the K
* extensions, so when running on UP, we have to patch these instructions away.
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 13:33 [PATCH] ARM: fix missing 'cpu_relax()' declaration Marc Zyngier
@ 2011-05-23 16:09 ` Russell King - ARM Linux
2011-05-23 16:23 ` Marc Zyngier
2011-05-23 16:23 ` Russell King - ARM Linux
0 siblings, 2 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2011-05-23 16:09 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 23, 2011 at 02:33:27PM +0100, Marc Zyngier wrote:
> ARM build fails with the following symptom:
>
> CC arch/arm/kernel/asm-offsets.s
> In file included from include/linux/seqlock.h:29,
> from include/linux/time.h:8,
> from include/linux/timex.h:56,
> from include/linux/sched.h:57,
> from arch/arm/kernel/asm-offsets.c:13:
> include/linux/spinlock.h: In function 'spin_unlock_wait':
> include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
> make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
>
> Fix it by including <asm/processor.h>.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Wonder why we haven't see this before. Could you send this to the patch
system please?
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 16:09 ` Russell King - ARM Linux
@ 2011-05-23 16:23 ` Marc Zyngier
2011-05-23 16:23 ` Russell King - ARM Linux
1 sibling, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2011-05-23 16:23 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 2011-05-23 at 17:09 +0100, Russell King - ARM Linux wrote:
> On Mon, May 23, 2011 at 02:33:27PM +0100, Marc Zyngier wrote:
> > ARM build fails with the following symptom:
> >
> > CC arch/arm/kernel/asm-offsets.s
> > In file included from include/linux/seqlock.h:29,
> > from include/linux/time.h:8,
> > from include/linux/timex.h:56,
> > from include/linux/sched.h:57,
> > from arch/arm/kernel/asm-offsets.c:13:
> > include/linux/spinlock.h: In function 'spin_unlock_wait':
> > include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
> > make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
> >
> > Fix it by including <asm/processor.h>.
> >
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>
> Wonder why we haven't see this before. Could you send this to the patch
> system please?
Guess we were lucky. It is probably an effect of
e66eed651fd18a961f11cda62f3b5286c8cc4f9f (list: remove prefetching from
regular list iterators), which indirectly stopped asm/processor.h from
being pulled.
Now in the patch system (6939/1).
Cheers,
M.
--
Reality is an implementation detail.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 16:09 ` Russell King - ARM Linux
2011-05-23 16:23 ` Marc Zyngier
@ 2011-05-23 16:23 ` Russell King - ARM Linux
2011-05-23 16:34 ` Marc Zyngier
1 sibling, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2011-05-23 16:23 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 23, 2011 at 05:09:44PM +0100, Russell King - ARM Linux wrote:
> On Mon, May 23, 2011 at 02:33:27PM +0100, Marc Zyngier wrote:
> > ARM build fails with the following symptom:
> >
> > CC arch/arm/kernel/asm-offsets.s
> > In file included from include/linux/seqlock.h:29,
> > from include/linux/time.h:8,
> > from include/linux/timex.h:56,
> > from include/linux/sched.h:57,
> > from arch/arm/kernel/asm-offsets.c:13:
> > include/linux/spinlock.h: In function 'spin_unlock_wait':
> > include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
> > make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
> >
> > Fix it by including <asm/processor.h>.
> >
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>
> Wonder why we haven't see this before. Could you send this to the patch
> system please?
Hmm, this doesn't fix the problem:
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/spinlock.h: In function ?spin_unlock_wait?:
include/linux/spinlock.h:360: error: implicit declaration of function ?cpu_relax?
My guess is that it does for you because you're building SMP, but the above
also happens with UP. So, I don't think this is the right fix.
I think its time to use git bisect to try and find what broke this and why.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 16:23 ` Russell King - ARM Linux
@ 2011-05-23 16:34 ` Marc Zyngier
2011-05-23 16:41 ` Russell King - ARM Linux
0 siblings, 1 reply; 8+ messages in thread
From: Marc Zyngier @ 2011-05-23 16:34 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 2011-05-23 at 17:23 +0100, Russell King - ARM Linux wrote:
> On Mon, May 23, 2011 at 05:09:44PM +0100, Russell King - ARM Linux wrote:
> > On Mon, May 23, 2011 at 02:33:27PM +0100, Marc Zyngier wrote:
> > > ARM build fails with the following symptom:
> > >
> > > CC arch/arm/kernel/asm-offsets.s
> > > In file included from include/linux/seqlock.h:29,
> > > from include/linux/time.h:8,
> > > from include/linux/timex.h:56,
> > > from include/linux/sched.h:57,
> > > from arch/arm/kernel/asm-offsets.c:13:
> > > include/linux/spinlock.h: In function 'spin_unlock_wait':
> > > include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
> > > make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
> > >
> > > Fix it by including <asm/processor.h>.
> > >
> > > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> >
> > Wonder why we haven't see this before. Could you send this to the patch
> > system please?
>
> Hmm, this doesn't fix the problem:
>
> CC arch/arm/kernel/asm-offsets.s
> In file included from include/linux/seqlock.h:29,
> from include/linux/time.h:8,
> from include/linux/timex.h:56,
> from include/linux/sched.h:57,
> from arch/arm/kernel/asm-offsets.c:13:
> include/linux/spinlock.h: In function ?spin_unlock_wait?:
> include/linux/spinlock.h:360: error: implicit declaration of function ?cpu_relax?
>
> My guess is that it does for you because you're building SMP, but the above
> also happens with UP. So, I don't think this is the right fix.
>
> I think its time to use git bisect to try and find what broke this and why.
Odd... It seems to build just fine here with UP:
$ grep SMP .config
CONFIG_BROKEN_ON_SMP=y
# CONFIG_SMP is not set
$ time make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 all
CHK include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
<stdin>:1554: warning: #warning syscall sendmmsg not implemented
CC init/main.o
CHK include/generated/compile.h
HOSTCC usr/gen_init_cpio
[...]
M.
--
Reality is an implementation detail.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 16:34 ` Marc Zyngier
@ 2011-05-23 16:41 ` Russell King - ARM Linux
2011-05-23 16:45 ` Russell King - ARM Linux
0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2011-05-23 16:41 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 23, 2011 at 05:34:33PM +0100, Marc Zyngier wrote:
> On Mon, 2011-05-23 at 17:23 +0100, Russell King - ARM Linux wrote:
> > Hmm, this doesn't fix the problem:
> >
> > CC arch/arm/kernel/asm-offsets.s
> > In file included from include/linux/seqlock.h:29,
> > from include/linux/time.h:8,
> > from include/linux/timex.h:56,
> > from include/linux/sched.h:57,
> > from arch/arm/kernel/asm-offsets.c:13:
> > include/linux/spinlock.h: In function ?spin_unlock_wait?:
> > include/linux/spinlock.h:360: error: implicit declaration of function ?cpu_relax?
> >
> > My guess is that it does for you because you're building SMP, but the above
> > also happens with UP. So, I don't think this is the right fix.
> >
> > I think its time to use git bisect to try and find what broke this and why.
>
> Odd... It seems to build just fine here with UP:
>
> $ grep SMP .config
> CONFIG_BROKEN_ON_SMP=y
> # CONFIG_SMP is not set
> $ time make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 all
> CHK include/linux/version.h
> HOSTCC scripts/basic/fixdep
> HOSTCC scripts/basic/docproc
> HOSTCC scripts/kallsyms
> HOSTCC scripts/conmakehash
> CC scripts/mod/empty.o
> HOSTCC scripts/mod/mk_elfconfig
> MKELF scripts/mod/elfconfig.h
> HOSTCC scripts/mod/file2alias.o
> HOSTCC scripts/mod/modpost.o
> HOSTCC scripts/mod/sumversion.o
> HOSTLD scripts/mod/modpost
> CHK include/generated/utsrelease.h
> make[1]: `include/generated/mach-types.h' is up to date.
> CC kernel/bounds.s
> GEN include/generated/bounds.h
> CC arch/arm/kernel/asm-offsets.s
> GEN include/generated/asm-offsets.h
> CALL scripts/checksyscalls.sh
> <stdin>:1554: warning: #warning syscall sendmmsg not implemented
> CC init/main.o
> CHK include/generated/compile.h
> HOSTCC usr/gen_init_cpio
> [...]
For what platform? I've tried a few and getting the same error message.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 16:41 ` Russell King - ARM Linux
@ 2011-05-23 16:45 ` Russell King - ARM Linux
2011-05-23 16:49 ` Marc Zyngier
0 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2011-05-23 16:45 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 23, 2011 at 05:41:23PM +0100, Russell King - ARM Linux wrote:
> On Mon, May 23, 2011 at 05:34:33PM +0100, Marc Zyngier wrote:
> > Odd... It seems to build just fine here with UP:
> >
> > $ grep SMP .config
> > CONFIG_BROKEN_ON_SMP=y
> > # CONFIG_SMP is not set
> > $ time make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 all
> > CHK include/linux/version.h
> > HOSTCC scripts/basic/fixdep
> > HOSTCC scripts/basic/docproc
> > HOSTCC scripts/kallsyms
> > HOSTCC scripts/conmakehash
> > CC scripts/mod/empty.o
> > HOSTCC scripts/mod/mk_elfconfig
> > MKELF scripts/mod/elfconfig.h
> > HOSTCC scripts/mod/file2alias.o
> > HOSTCC scripts/mod/modpost.o
> > HOSTCC scripts/mod/sumversion.o
> > HOSTLD scripts/mod/modpost
> > CHK include/generated/utsrelease.h
> > make[1]: `include/generated/mach-types.h' is up to date.
> > CC kernel/bounds.s
> > GEN include/generated/bounds.h
> > CC arch/arm/kernel/asm-offsets.s
> > GEN include/generated/asm-offsets.h
> > CALL scripts/checksyscalls.sh
> > <stdin>:1554: warning: #warning syscall sendmmsg not implemented
> > CC init/main.o
> > CHK include/generated/compile.h
> > HOSTCC usr/gen_init_cpio
> > [...]
>
> For what platform? I've tried a few and getting the same error message.
Found it, my for-next tree has the prefetching change but not this:
commit d974d905cbfc1039a73ba0c7eea3f4d4e13c0624
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri May 20 15:48:17 2011 +1000
spinlock_up.h: include asm/processor.h in for cpu_relax
which fixes the UP build problem.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: fix missing 'cpu_relax()' declaration
2011-05-23 16:45 ` Russell King - ARM Linux
@ 2011-05-23 16:49 ` Marc Zyngier
0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2011-05-23 16:49 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 2011-05-23 at 17:45 +0100, Russell King - ARM Linux wrote:
> On Mon, May 23, 2011 at 05:41:23PM +0100, Russell King - ARM Linux wrote:
> > On Mon, May 23, 2011 at 05:34:33PM +0100, Marc Zyngier wrote:
> > > Odd... It seems to build just fine here with UP:
> > >
> > > $ grep SMP .config
> > > CONFIG_BROKEN_ON_SMP=y
> > > # CONFIG_SMP is not set
> > > $ time make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 all
> > > CHK include/linux/version.h
> > > HOSTCC scripts/basic/fixdep
> > > HOSTCC scripts/basic/docproc
> > > HOSTCC scripts/kallsyms
> > > HOSTCC scripts/conmakehash
> > > CC scripts/mod/empty.o
> > > HOSTCC scripts/mod/mk_elfconfig
> > > MKELF scripts/mod/elfconfig.h
> > > HOSTCC scripts/mod/file2alias.o
> > > HOSTCC scripts/mod/modpost.o
> > > HOSTCC scripts/mod/sumversion.o
> > > HOSTLD scripts/mod/modpost
> > > CHK include/generated/utsrelease.h
> > > make[1]: `include/generated/mach-types.h' is up to date.
> > > CC kernel/bounds.s
> > > GEN include/generated/bounds.h
> > > CC arch/arm/kernel/asm-offsets.s
> > > GEN include/generated/asm-offsets.h
> > > CALL scripts/checksyscalls.sh
> > > <stdin>:1554: warning: #warning syscall sendmmsg not implemented
> > > CC init/main.o
> > > CHK include/generated/compile.h
> > > HOSTCC usr/gen_init_cpio
> > > [...]
> >
> > For what platform? I've tried a few and getting the same error message.
>
> Found it, my for-next tree has the prefetching change but not this:
>
> commit d974d905cbfc1039a73ba0c7eea3f4d4e13c0624
> Author: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri May 20 15:48:17 2011 +1000
>
> spinlock_up.h: include asm/processor.h in for cpu_relax
>
> which fixes the UP build problem.
>
Makes sense. Thanks for solving the mystery!
M.
--
Reality is an implementation detail.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-05-23 16:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 13:33 [PATCH] ARM: fix missing 'cpu_relax()' declaration Marc Zyngier
2011-05-23 16:09 ` Russell King - ARM Linux
2011-05-23 16:23 ` Marc Zyngier
2011-05-23 16:23 ` Russell King - ARM Linux
2011-05-23 16:34 ` Marc Zyngier
2011-05-23 16:41 ` Russell King - ARM Linux
2011-05-23 16:45 ` Russell King - ARM Linux
2011-05-23 16:49 ` Marc Zyngier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.