Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 6939/1: fix missing 'cpu_relax()' declaration

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>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Marc Zyngier and committed by
Russell King
603605ab 57ce9bb3

+2
+2
arch/arm/include/asm/spinlock.h
··· 5 5 #error SMP not supported on pre-ARMv6 CPUs 6 6 #endif 7 7 8 + #include <asm/processor.h> 9 + 8 10 /* 9 11 * sev and wfe are ARMv6K extensions. Uniprocessor ARMv6 may not have the K 10 12 * extensions, so when running on UP, we have to patch these instructions away.