aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 17:00:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 17:00:05 -0400
commit453c1404c5273a30d715e5a83372a78cff70b6d9 (patch)
tree94a5a3abd85137c4def416a84a45989751260f20 /arch/x86/kernel/apic_64.c
parenta208f37a465e222218974ab20a31b42b7b4893b2 (diff)
parent35b680557f95564f70f21a8d3f5c72e101fab260 (diff)
Merge branch 'x86/apic' into x86/x2apic
Conflicts: arch/x86/kernel/paravirt.c arch/x86/kernel/smpboot.c arch/x86/kernel/vmi_32.c arch/x86/lguest/boot.c arch/x86/xen/enlighten.c include/asm-x86/apic.h include/asm-x86/paravirt.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index c75f58a66d8e..46e612408aca 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -61,7 +61,7 @@ EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
61/* 61/*
62 * Debug level, exported for io_apic.c 62 * Debug level, exported for io_apic.c
63 */ 63 */
64int apic_verbosity; 64unsigned int apic_verbosity;
65 65
66/* Have we found an MP table */ 66/* Have we found an MP table */
67int smp_found_config; 67int smp_found_config;
@@ -386,7 +386,7 @@ static void setup_APIC_timer(void)
386 386
387#define TICK_COUNT 100000000 387#define TICK_COUNT 100000000
388 388
389static void __init calibrate_APIC_clock(void) 389static int __init calibrate_APIC_clock(void)
390{ 390{
391 unsigned apic, apic_start; 391 unsigned apic, apic_start;
392 unsigned long tsc, tsc_start; 392 unsigned long tsc, tsc_start;
@@ -440,6 +440,17 @@ static void __init calibrate_APIC_clock(void)
440 clockevent_delta2ns(0xF, &lapic_clockevent); 440 clockevent_delta2ns(0xF, &lapic_clockevent);
441 441
442 calibration_result = result / HZ; 442 calibration_result = result / HZ;
443
444 /*
445 * Do a sanity check on the APIC calibration result
446 */
447 if (calibration_result < (1000000 / HZ)) {
448 printk(KERN_WARNING
449 "APIC frequency too slow, disabling apic timer\n");
450 return -1;
451 }
452
453 return 0;
443} 454}
444 455
445/* 456/*
@@ -466,14 +477,7 @@ void __init setup_boot_APIC_clock(void)
466 } 477 }
467 478
468 printk(KERN_INFO "Using local APIC timer interrupts.\n"); 479 printk(KERN_INFO "Using local APIC timer interrupts.\n");
469 calibrate_APIC_clock(); 480 if (calibrate_APIC_clock()) {
470
471 /*
472 * Do a sanity check on the APIC calibration result
473 */
474 if (calibration_result < (1000000 / HZ)) {
475 printk(KERN_WARNING
476 "APIC frequency too slow, disabling apic timer\n");
477 /* No broadcast on UP ! */ 481 /* No broadcast on UP ! */
478 if (num_possible_cpus() > 1) 482 if (num_possible_cpus() > 1)
479 setup_APIC_timer(); 483 setup_APIC_timer();