aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_32.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:33:04 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:04 -0500
commitc2b84b30b8c8bbccf4d2e32f8a3a70ad09ba9ab8 (patch)
treedb749014619fdef88cf458daad810ddd06023fe7 /arch/x86/kernel/apic_32.c
parent387faedb1dee2e917811acd05902cc36142a4850 (diff)
x86: sanity check APIC timer frequency
Check the APIC timer calibration result for sanity. When the frequency is out of range, issue a warning and disable the local APIC timer. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_32.c')
-rw-r--r--arch/x86/kernel/apic_32.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index cbcf72cde956..20d4dbc42e6e 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -470,6 +470,19 @@ void __init setup_boot_APIC_clock(void)
470 470
471 local_apic_timer_verify_ok = 1; 471 local_apic_timer_verify_ok = 1;
472 472
473 /*
474 * Do a sanity check on the APIC calibration result
475 */
476 if (calibration_result < (1000000 / HZ)) {
477 local_irq_enable();
478 printk(KERN_WARNING
479 "APIC frequency too slow, disabling apic timer\n");
480 /* No broadcast on UP ! */
481 if (num_possible_cpus() > 1)
482 setup_APIC_timer();
483 return;
484 }
485
473 /* We trust the pm timer based calibration */ 486 /* We trust the pm timer based calibration */
474 if (!pm_referenced) { 487 if (!pm_referenced) {
475 apic_printk(APIC_VERBOSE, "... verify APIC timer\n"); 488 apic_printk(APIC_VERBOSE, "... verify APIC timer\n");