build fix for smp
PATCH 1/1 build fix for smp
From: Glauber Costa <[email protected]>
smp.c won't build when reboot.c is not compiled in, due to the reboot_force dependency. It is always okay for x86_64, but should be conditional on x86_32
--- arch/x86/kernel/smp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/smp.c +2 -0
@@ -274,8 +274,10 @@ static void native_smp_send_stop(void)int nolock;unsigned long flags; +#if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_BIOS_REBOOT )if (reboot_force)return ; +#endif /* Don't deadlock on the call lock in panic */ nolock = !spin_trylock (&call_lock);
Signature · 1 line
1.5.0.6
arch/x86/kernel/smp.c static void native_smp_send_stop(void) · line 280
Quoted 4 lines · Glauber de Oliveira Costa
arch/x86/kernel/smp.c +2
-0+#if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_BIOS_REBOOT )if (reboot_force)return ; +#endif
please solve it slightly differently: introduce a uniformly usable reboot_force flag, that will always default to the constant of 1 if !X86_64 && !X86_BIOS_REBOOT. That makes the code cleaner - and not the least i can also merge the fix earlier in the series, without having to redo the big smp.c movement patch :-)
Ingo
Quoted 14 lines · Ingo Molnar
arch/x86/kernel/smp.c static void native_smp_send_stop(void) · line 280
Quoted 4 lines · Glauber de Oliveira Costa
arch/x86/kernel/smp.c +2
-0+#if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_BIOS_REBOOT )if (reboot_force)return ; +#endif please solve it slightly differently: introduce a uniformly usable
reboot_forceflag, that will always default to the constant of 1 if !X86_64 && !X86_BIOS_REBOOT. That makes the code cleaner - and not the least i can also merge the fix earlier in the series, without having to redo the bigsmp.cmovement patch :-)
Quoted 2 lines
Ingo
Hello,
what's the final fix for this issue? 2.6.25-git11 is still broken, just gave me
arch/x86/kernel/built-in.o: In function `native_smp_send_stop':
smp.c:(.text+0xc751): undefined reference to `reboot_force'
make: *** [.tmp_vmlinux1] Error 1
for a randconfig. Same reported at http://lkml.org/lkml/2008/4/27/39
thanks,
-sergio
Quoted 8 lines · Sergio Luis
Hello, what's the final fix for this issue? 2.6.25-git11 is still broken, just gave me
arch/x86/kernel/built-in.o: In function `native_smp_send_stop':
smp.c:(.text+0xc751): undefined reference to `reboot_force'
make: *** [.tmp_vmlinux1] Error 1for a randconfig. Same reported at http://lkml.org/lkml/2008/4/27/39
btw., that's a VISWS config - that wont boot on any PC. The patch below should fix this.
Ingo
--------------------------->
Subject: x86 VISWS: build fix
From: Ingo Molnar <[email protected]>
Date: Mon Apr 28 10:46:58 CEST 2008
the 'reboot_force' flag is a notion that non-PC subarchitectures do not have.
--- include/asm-x86/proto.h | 4 ++++ 1 file changed, 4 insertions(+)
include/asm-x86/proto.h +4 -0
@@ -20,7 +20,11 @@ extern void syscall32_cpu_init(void);extern void check_efer (void ); +#ifdef X86_BIOS_REBOOT extern int reboot_force; +#else +static const int reboot_force =0 ; +#endif long do_arch_prctl (struct task_struct *task,int code,unsigned long addr);
Quoted 6 lines · Ingo Molnar
Quoted 2 lines · Sergio Luis
Hello, what's the final fix for this issue? 2.6.25-git11 is still broken, just gave me
Quoted 8 lines
Quoted 5 lines
arch/x86/kernel/built-in.o: In function `native_smp_send_stop':
smp.c:(.text+0xc751): undefined reference to `reboot_force'
make: *** [.tmp_vmlinux1] Error 1for a randconfig. Same reported at http://lkml.org/lkml/2008/4/27/39
btw., that's a VISWS config - that wont boot on any PC. The patch below should fix this.
Yep, it does fix it thanks.
-sergio
Quoted 33 lines
Ingo
--------------------------->
Subject: x86 VISWS: build fix
From: Ingo Molnar <[email protected]>
Date: Mon Apr 28 10:46:58 CEST 2008the '
reboot_force' flag is a notion that non-PC subarchitectures do not have.Signed-off-by Ingo Molnar <[email protected]>---
include/asm-x86/proto.h | 4 ++++ 1 file changed, 4 insertions(+)Index:
linux/include/asm-x86/proto.h
===================================================================
---linux.orig/include/asm-x86/proto.h
+++linux/include/asm-x86/proto.h
@@ -20,7 +20,11 @@ extern voidsyscall32_cpu_init(void);extern void check_efer(void);+#ifdef
X86_BIOS_REBOOT
extern intreboot_force;
+#else
+static const intreboot_force= 0;
+#endiflong
do_arch_prctl(struct task_struct *task, int code, unsigned long addr);
Quoted 14 lines · Sergio Luis
Quoted 13 lines · Ingo Molnar
arch/x86/kernel/smp.c static void native_smp_send_stop(void) · line 280
Quoted 4 lines · Glauber de Oliveira Costa
arch/x86/kernel/smp.c +2
-0+#if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_BIOS_REBOOT )if (reboot_force)return ; +#endif please solve it slightly differently: introduce a uniformly usable
reboot_forceflag, that will always default to the constant of 1 if !X86_64 && !X86_BIOS_REBOOT. That makes the code cleaner - and not the least i can also merge the fix earlier in the series, without having to redo the bigsmp.cmovement patch :-)
Quoted 5 lines
Quoted 2 lines
Ingo
Hello,
what's the final fix for this issue? 2.6.25-git11 is still broken, just gave me
Doh. I had the patch, but completely forgot to send it to ingo. Thanks for raising this issue again. (But I saw ingo already put a fix for this in)
Quoted 8 lines
arch/x86/kernel/built-in.o: In function `native_smp_send_stop':
smp.c:(.text+0xc751): undefined reference to `reboot_force'
make: *** [.tmp_vmlinux1] Error 1for a randconfig. Same reported at http://lkml.org/lkml/2008/4/27/39
thanks,
-sergio