diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:34 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:34 -0400 |
commit | b7f5e3c7742d5332b78b831131f43fc3630e6322 (patch) | |
tree | 4334c97a3a8e2ac409444ecb2d7844d3a63e4118 /arch/x86_64/kernel/apic.c | |
parent | 3fa7c794fe4dc127f7fac3fad4d13628e68f89ce (diff) |
[PATCH] Don't access the APIC in safe_smp_processor_id when it is not mapped yet
Lockdep can call the dwarf2 unwinder early, and the dwarf2 code
uses safe_smp_processor_id which tries to access the local APIC page.
But that doesn't work before the APIC code has set up its fixmap.
Check for this case and always return boot cpu then.
Cc: jbeulich@novell.com
Cc: mingo@elte.hu
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/apic.c')
-rw-r--r-- | arch/x86_64/kernel/apic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index b95d1e378b96..6472e321cad7 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/timex.h> | 38 | #include <asm/timex.h> |
39 | #include <asm/apic.h> | 39 | #include <asm/apic.h> |
40 | 40 | ||
41 | int apic_mapped; | ||
41 | int apic_verbosity; | 42 | int apic_verbosity; |
42 | int apic_runs_main_timer; | 43 | int apic_runs_main_timer; |
43 | int apic_calibrate_pmtmr __initdata; | 44 | int apic_calibrate_pmtmr __initdata; |
@@ -600,6 +601,7 @@ void __init init_apic_mappings(void) | |||
600 | apic_phys = mp_lapic_addr; | 601 | apic_phys = mp_lapic_addr; |
601 | 602 | ||
602 | set_fixmap_nocache(FIX_APIC_BASE, apic_phys); | 603 | set_fixmap_nocache(FIX_APIC_BASE, apic_phys); |
604 | apic_mapped = 1; | ||
603 | apic_printk(APIC_VERBOSE,"mapped APIC to %16lx (%16lx)\n", APIC_BASE, apic_phys); | 605 | apic_printk(APIC_VERBOSE,"mapped APIC to %16lx (%16lx)\n", APIC_BASE, apic_phys); |
604 | 606 | ||
605 | /* | 607 | /* |