diff options
-rw-r--r-- | arch/x86_64/kernel/apic.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/smp.c | 2 | ||||
-rw-r--r-- | include/asm-x86_64/apic.h | 1 |
3 files changed, 4 insertions, 1 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 | /* |
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index 06af6ca60129..2df988bbf312 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c | |||
@@ -526,7 +526,7 @@ int safe_smp_processor_id(void) | |||
526 | { | 526 | { |
527 | unsigned apicid, i; | 527 | unsigned apicid, i; |
528 | 528 | ||
529 | if (disable_apic) | 529 | if (disable_apic || !apic_mapped) |
530 | return 0; | 530 | return 0; |
531 | 531 | ||
532 | apicid = hard_smp_processor_id(); | 532 | apicid = hard_smp_processor_id(); |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index 29ee735278f2..9e66d32330c9 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -18,6 +18,7 @@ | |||
18 | extern int apic_verbosity; | 18 | extern int apic_verbosity; |
19 | extern int apic_runs_main_timer; | 19 | extern int apic_runs_main_timer; |
20 | extern int ioapic_force; | 20 | extern int ioapic_force; |
21 | extern int apic_mapped; | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Define the default level of output to be very little | 24 | * Define the default level of output to be very little |