2008-03-19 19:39:27

by Glauber Costa

[permalink] [raw]
Subject: [PATCH] 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

Signed-off-by: Glauber Costa <[email protected]>
---
arch/x86/kernel/smp.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 16c52aa..0ee8ad5 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -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);
--
1.5.0.6


2008-03-19 21:03:13

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] build fix for smp


* Glauber de Oliveira Costa <[email protected]> wrote:

> +#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