diff options
author | Andi Kleen <ak@suse.de> | 2007-08-10 16:31:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-11 18:58:13 -0400 |
commit | d3f7eae182b04997be19343a23f7009170f4f7a5 (patch) | |
tree | 162fc610811c762b322eedaae909847ab4465da1 /arch/i386/kernel/apic.c | |
parent | d2d0251f6faa2cf341500a44310bbaa815a8a972 (diff) |
i386: Use global flag to disable broken local apic timer on AMD CPUs.
The Averatec 2370 and some other Turion laptop BIOS seems to program the
ENABLE_C1E MSR inconsistently between cores. This confuses the lapic
use heuristics because when C1E is enabled anywhere it seems to affect
the complete chip.
Use a global flag instead of a per cpu flag to handle this.
If any CPU has C1E enabled disabled lapic use.
Thanks to Cal Peake for debugging.
Cc: tglx@linutronix.de
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/apic.c')
-rw-r--r-- | arch/i386/kernel/apic.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index bfc6cb7df7e7..f9fff29e01a9 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -61,8 +61,9 @@ static int enable_local_apic __initdata = 0; | |||
61 | 61 | ||
62 | /* Local APIC timer verification ok */ | 62 | /* Local APIC timer verification ok */ |
63 | static int local_apic_timer_verify_ok; | 63 | static int local_apic_timer_verify_ok; |
64 | /* Disable local APIC timer from the kernel commandline or via dmi quirk */ | 64 | /* Disable local APIC timer from the kernel commandline or via dmi quirk |
65 | static int local_apic_timer_disabled; | 65 | or using CPU MSR check */ |
66 | int local_apic_timer_disabled; | ||
66 | /* Local APIC timer works in C2 */ | 67 | /* Local APIC timer works in C2 */ |
67 | int local_apic_timer_c2_ok; | 68 | int local_apic_timer_c2_ok; |
68 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); | 69 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); |
@@ -370,12 +371,9 @@ void __init setup_boot_APIC_clock(void) | |||
370 | long delta, deltapm; | 371 | long delta, deltapm; |
371 | int pm_referenced = 0; | 372 | int pm_referenced = 0; |
372 | 373 | ||
373 | if (boot_cpu_has(X86_FEATURE_LAPIC_TIMER_BROKEN)) | ||
374 | local_apic_timer_disabled = 1; | ||
375 | |||
376 | /* | 374 | /* |
377 | * The local apic timer can be disabled via the kernel | 375 | * The local apic timer can be disabled via the kernel |
378 | * commandline or from the test above. Register the lapic | 376 | * commandline or from the CPU detection code. Register the lapic |
379 | * timer as a dummy clock event source on SMP systems, so the | 377 | * timer as a dummy clock event source on SMP systems, so the |
380 | * broadcast mechanism is used. On UP systems simply ignore it. | 378 | * broadcast mechanism is used. On UP systems simply ignore it. |
381 | */ | 379 | */ |