aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/alternative.c
diff options
context:
space:
mode:
authorFengguang Wu <wfg@mail.ustc.edu.cn>2007-10-17 12:04:34 -0400
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-17 14:15:33 -0400
commitf68fd5f480248ca49e20e30a8e2387bc54694580 (patch)
treefa58630670da00abaf6b99e81153e0b4d021c5ee /arch/x86/kernel/alternative.c
parentc1217a75ea102d4e69321f210fab60bc47b9a48e (diff)
x86: call free_init_pages() with irqs enabled in alternative_instructions()
In alternative_instructions(), call free_init_pages() with irqs enabled. It fixes the warning message in smp_call_function*(), which should not be called with irqs disabled. [ 0.310000] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) [ 0.310000] CPU: L2 Cache: 512K (64 bytes/line) [ 0.310000] CPU 0/0 -> Node 0 [ 0.310000] SMP alternatives: switching to UP code [ 0.310000] Freeing SMP alternatives: 25k freed [ 0.310000] WARNING: at arch/x86_64/kernel/smp.c:397 smp_call_function_mask() [ 0.310000] [ 0.310000] Call Trace: [ 0.310000] [<ffffffff8100dbde>] dump_trace+0x3ee/0x4a0 [ 0.310000] [<ffffffff8100dcd3>] show_trace+0x43/0x70 [ 0.310000] [<ffffffff8100dd15>] dump_stack+0x15/0x20 [ 0.310000] [<ffffffff8101cd44>] smp_call_function_mask+0x94/0xa0 [ 0.310000] [<ffffffff8101d0b2>] smp_call_function+0x32/0x40 [ 0.310000] [<ffffffff8104277f>] on_each_cpu+0x1f/0x50 [ 0.310000] [<ffffffff81026eac>] global_flush_tlb+0x8c/0x110 [ 0.310000] [<ffffffff81025c85>] free_init_pages+0xe5/0xf0 [ 0.310000] [<ffffffff81549b5e>] alternative_instructions+0x7e/0x150 [ 0.310000] [<ffffffff8154a2ea>] check_bugs+0x1a/0x20 [ 0.310000] [<ffffffff81540c4a>] start_kernel+0x2da/0x380 [ 0.310000] [<ffffffff81540132>] _sinittext+0x132/0x140 [ 0.310000] [ 0.320000] ACPI: Core revision 20070126 [ 0.560000] Using local APIC timer interrupts. [ 0.590000] Detected 62.496 MHz APIC timer. [ 0.590000] Brought up 1 CPUs [ tglx: arch/x86 adaptation ] Cc: Laurent Vivier <Laurent.Vivier@bull.net> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r--arch/x86/kernel/alternative.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 11b03d3c6fda..dff1c9e1c2ee 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -415,9 +415,6 @@ void __init alternative_instructions(void)
415 alternatives_smp_unlock(__smp_locks, __smp_locks_end, 415 alternatives_smp_unlock(__smp_locks, __smp_locks_end,
416 _text, _etext); 416 _text, _etext);
417 } 417 }
418 free_init_pages("SMP alternatives",
419 (unsigned long)__smp_locks,
420 (unsigned long)__smp_locks_end);
421 } else { 418 } else {
422 alternatives_smp_module_add(NULL, "core kernel", 419 alternatives_smp_module_add(NULL, "core kernel",
423 __smp_locks, __smp_locks_end, 420 __smp_locks, __smp_locks_end,
@@ -428,6 +425,11 @@ void __init alternative_instructions(void)
428 apply_paravirt(__parainstructions, __parainstructions_end); 425 apply_paravirt(__parainstructions, __parainstructions_end);
429 local_irq_restore(flags); 426 local_irq_restore(flags);
430 427
428 if (smp_alt_once)
429 free_init_pages("SMP alternatives",
430 (unsigned long)__smp_locks,
431 (unsigned long)__smp_locks_end);
432
431 restart_nmi(); 433 restart_nmi();
432#ifdef CONFIG_X86_MCE 434#ifdef CONFIG_X86_MCE
433 restart_mce(); 435 restart_mce();