Skip to contentSkip to conversation

i386: KEXEC must depend on (!SMP && X86_LOCAL_APIC)

PATCH In review Adrian Bunk 2 participants 4 messages Jun 28, 2006 – Jun 29, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386: KEXEC must depend on (!SMP && X86_LOCAL_APIC)

This patch fixes the following issue with CONFIG_SMP=y and CONFIG_X86_VOYAGER=y:

<-- snip -->

...
CC arch/i386/kernel/crash.o
arch/i386/kernel/crash.c: In function ‘crash_nmi_callback’:
arch/i386/kernel/crash.c:113: error: implicit declaration of function ‘disable_local_APIC’

<-- snip -->

arch/i386/Kconfig renamed from arch/i386/Kconfig.old +1 -1
@@ -748,7 +748,7 @@
 
 config KEXEC
 	bool "kexec system call (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	depends on EXPERIMENTAL && (!SMP || X86_LOCAL_APIC)
 	help
 	  kexec is a system call that implements the ability to shutdown your
 	  current kernel, and to start another kernel.  It is like a reboot
#1 lore raw
Quoted 5 lines · Adrian Bunk

This patch fixes the following issue with CONFIG_SMP=y and CONFIG_X86_VOYAGER=y:

<-- snip -->

Quoted 7 lines

...
CC arch/i386/kernel/crash.o
arch/i386/kernel/crash.c: In function ‘crash_nmi_callback’:
arch/i386/kernel/crash.c:113: error: implicit declaration of function ‘disable_local_APIC’

<-- snip -->

I think the patch below more correctly captures the dependency.

In truth that call to disable_local_APIC() is a bug but the kernel isn't ready yet to boot in apic only mode, so it remains until the apic initialization can be moved into init_IRQ.

Does this sound good?

Eric

arch/i386/kernel/crash.c +1 -1
index 48f0f62..5b96f03 100644
@@ -90,7 +90,7 @@ static void crash_save_self(struct pt_re
        crash_save_this_cpu(regs, cpu);
 }
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
 static atomic_t waiting_for_crash_ipi;
 
 static int crash_nmi_callback(struct pt_regs *regs, int cpu)
#2 lore raw
Quoted 15 lines · Eric W. Biederman
Quoted 5 lines · Adrian Bunk

This patch fixes the following issue with CONFIG_SMP=y and CONFIG_X86_VOYAGER=y:

<-- snip -->

Quoted 7 lines

...
CC arch/i386/kernel/crash.o
arch/i386/kernel/crash.c: In function ‘crash_nmi_callback’:
arch/i386/kernel/crash.c:113: error: implicit declaration of function ‘disable_local_APIC’

<-- snip -->

Quoted 7 lines

I think the patch below more correctly captures the dependency.

In truth that call to disable_local_APIC() is a bug but the kernel isn't ready yet to boot in apic only mode, so it remains until the apic initialization can be moved into init_IRQ.

Does this sound good?

It does compile (I can't test it due to lack of hardware).

Quoted 1 line

Eric

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#3 lore raw
Quoted 18 lines · Adrian Bunk
Quoted 17 lines · Eric W. Biederman
Quoted 5 lines · Adrian Bunk

This patch fixes the following issue with CONFIG_SMP=y and CONFIG_X86_VOYAGER=y:

<-- snip -->

Quoted 7 lines

...
CC arch/i386/kernel/crash.o
arch/i386/kernel/crash.c: In function ‘crash_nmi_callback’:
arch/i386/kernel/crash.c:113: error: implicit declaration of function ‘disable_local_APIC’

<-- snip -->

I think the patch below more correctly captures the dependency.

Quoted 7 lines
Quoted 5 lines

In truth that call to disable_local_APIC() is a bug but the kernel isn't ready yet to boot in apic only mode, so it remains until the apic initialization can be moved into init_IRQ.

Does this sound good?

It does compile (I can't test it due to lack of hardware).

The code that is disabled is really an optimization to get a higher quality crash dump so we should be ok.

At the very least it should come very close to working for anyone on that subarch.

Eric