public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build fix for smp
@ 2008-03-19 17:11 Glauber de Oliveira Costa
  2008-03-19 19:52 ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Glauber de Oliveira Costa @ 2008-03-19 17:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, tglx, mingo, ak, Glauber Costa

From: Glauber Costa <gcosta@redhat.com>

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 <gcosta@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build fix for smp
  2008-03-19 17:11 [PATCH] build fix for smp Glauber de Oliveira Costa
@ 2008-03-19 19:52 ` Ingo Molnar
  2008-04-28  7:52   ` Sergio Luis
  0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2008-03-19 19:52 UTC (permalink / raw)
  To: Glauber de Oliveira Costa; +Cc: linux-kernel, akpm, tglx, ak


* Glauber de Oliveira Costa <gcosta@redhat.com> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build fix for smp
  2008-03-19 19:52 ` Ingo Molnar
@ 2008-04-28  7:52   ` Sergio Luis
  2008-04-28  8:50     ` Ingo Molnar
  2008-04-28 14:16     ` Glauber Costa
  0 siblings, 2 replies; 6+ messages in thread
From: Sergio Luis @ 2008-04-28  7:52 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Glauber de Oliveira Costa, linux-kernel, akpm, tglx, ak

On Wed, Mar 19, 2008 at 4:52 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
>  * Glauber de Oliveira Costa <gcosta@redhat.com> 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
>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build fix for smp
  2008-04-28  7:52   ` Sergio Luis
@ 2008-04-28  8:50     ` Ingo Molnar
  2008-04-28  9:01       ` Sergio Luis
  2008-04-28 14:16     ` Glauber Costa
  1 sibling, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2008-04-28  8:50 UTC (permalink / raw)
  To: Sergio Luis
  Cc: Glauber de Oliveira Costa, linux-kernel, akpm, tglx, ak,
	Avi Kivity


* Sergio Luis <sergio@uece.br> wrote:

> 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

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 <mingo@elte.hu>
Date: Mon Apr 28 10:46:58 CEST 2008

the 'reboot_force' flag is a notion that non-PC subarchitectures do
not have.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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 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);
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build fix for smp
  2008-04-28  8:50     ` Ingo Molnar
@ 2008-04-28  9:01       ` Sergio Luis
  0 siblings, 0 replies; 6+ messages in thread
From: Sergio Luis @ 2008-04-28  9:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Glauber de Oliveira Costa, linux-kernel, akpm, tglx, ak,
	Avi Kivity

On Mon, Apr 28, 2008 at 5:50 AM, Ingo Molnar <mingo@elte.hu> wrote:
>
>  * Sergio Luis <sergio@uece.br> wrote:
>
>  > 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
>
>  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

>
>         Ingo
>
>  --------------------------->
>  Subject: x86 VISWS: build fix
>  From: Ingo Molnar <mingo@elte.hu>
>  Date: Mon Apr 28 10:46:58 CEST 2008
>
>  the 'reboot_force' flag is a notion that non-PC subarchitectures do
>  not have.
>
>  Signed-off-by: Ingo Molnar <mingo@elte.hu>
>  ---
>   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 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);
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build fix for smp
  2008-04-28  7:52   ` Sergio Luis
  2008-04-28  8:50     ` Ingo Molnar
@ 2008-04-28 14:16     ` Glauber Costa
  1 sibling, 0 replies; 6+ messages in thread
From: Glauber Costa @ 2008-04-28 14:16 UTC (permalink / raw)
  To: Sergio Luis; +Cc: Ingo Molnar, linux-kernel, akpm, tglx, ak

Sergio Luis wrote:
> On Wed, Mar 19, 2008 at 4:52 PM, Ingo Molnar <mingo@elte.hu> wrote:
>>  * Glauber de Oliveira Costa <gcosta@redhat.com> 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
>>
> 
> 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)

> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-28 14:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 17:11 [PATCH] build fix for smp Glauber de Oliveira Costa
2008-03-19 19:52 ` Ingo Molnar
2008-04-28  7:52   ` Sergio Luis
2008-04-28  8:50     ` Ingo Molnar
2008-04-28  9:01       ` Sergio Luis
2008-04-28 14:16     ` Glauber Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox