On Tue, 2007-04-10 at 18:18 -0700, Andrew Morton wrote:
> On Tue, 10 Apr 2007 20:48:38 -0400
> Mathieu Desnoyers <[email protected]> wrote:
>
> > I get the following build error when building 2.6.21-rc6-mm1 for
> > sparc64:
> >
> > /opt/crosstool/gcc-3.4.5-glibc-2.3.6/sparc64-unknown-linux-gnu/bin/sparc64-unknown-linux-gnu-gcc -Wp,-MD,arch/sparc64/kernel/.traps.o.d -nostdinc -isystem /opt/crosstool/gcc-3.4.5-glibc-2.3.6/sparc64-unknown-linux-gnu/lib/gcc/sparc64-unknown-linux-gnu/3.4.5/include -D__KERNEL__ -Iinclude -Iinclude2 -I/home/compudj/git/linux-2.6-lttng/include -include include/linux/autoconf.h -I/home/compudj/git/linux-2.6-lttng/arch/sparc64/kernel -Iarch/sparc64/kernel -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -fomit-frame-pointer -Wdeclaration-after-statement -Werror -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(traps)" -D"KBUILD_MODNAME=KBUILD_STR(traps)" -c -o arch/sparc64/kernel/traps.o /home/compudj/git/linux-2.6-lttng/arch/sparc64/kernel/traps.c
> > /home/compudj/git/linux-2.6-lttng/arch/sparc64/kernel/traps.c: In function `init_cur_cpu_trap':
> > /home/compudj/git/linux-2.6-lttng/arch/sparc64/kernel/traps.c:2497: warning: implicit declaration of function `hard_smp_processor_id'
> > make[2]: *** [arch/sparc64/kernel/traps.o] Error 1
> > make[1]: *** [arch/sparc64/kernel] Error 2
> > make: *** [_all] Error 2
>
> Not sure what the approved fix is here. Fernando, please take a look, and
> review all other architectures?
The problem is that to use hard_smp_processor_id in UP kernels just
including linux/smp.h does not suffice anymore. Now
hard_smp_processor_id is architecture specific code and consequently
asm/smp.h should be included explicitly.
Mathieu, does the (untested) patch below fix this issue?
[PATCH] Remove hardcoding of hard_smp_processor_id on UP systems -
sparc64 fix
To use hard_smp_processor_id in UP kernels just including linux/smp.h
does not suffice anymore. Now hard_smp_processor_id is architecture
specific code and consequently asm/smp.h should be included explicitly.
Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
---
diff -urNp linux-2.6.21-rc6-mm1-orig/arch/sparc64/kernel/traps.c linux-2.6.21-rc6-mm1/arch/sparc64/kernel/traps.c
--- linux-2.6.21-rc6-mm1-orig/arch/sparc64/kernel/traps.c 2007-04-11 10:48:09.000000000 +0900
+++ linux-2.6.21-rc6-mm1/arch/sparc64/kernel/traps.c 2007-04-11 10:57:06.000000000 +0900
@@ -19,6 +19,7 @@
#include <linux/init.h>
#include <linux/kdebug.h>
+#include <asm/smp.h>
#include <asm/delay.h>
#include <asm/system.h>
#include <asm/ptrace.h>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]