]> Git Repo - linux.git/commitdiff
x86, tsc, apic: Unbreak static (MSR) calibration when CONFIG_X86_LOCAL_APIC=n
authorH. Peter Anvin <[email protected]>
Thu, 16 Jan 2014 21:00:21 +0000 (13:00 -0800)
committerH. Peter Anvin <[email protected]>
Thu, 16 Jan 2014 21:00:21 +0000 (13:00 -0800)
If we aren't going to use the local APIC anyway, we obviously don't
care about its timer frequency.

Link: http://lkml.kernel.org/r/[email protected]
Reported-by: Fengguang Wu <[email protected]>
Cc: Bin Gao <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
arch/x86/kernel/tsc_msr.c

index c5027724e3071ba7ff36e8e2df3fd938785eaa5d..8b5434f4389fc4afbbc7d297ab61ec403aedb9d8 100644 (file)
@@ -118,8 +118,10 @@ int try_msr_calibrate_tsc(unsigned long *fast_calibrate)
        *fast_calibrate = freq * ratio;
        pr_info("TSC runs at %lu KHz\n", *fast_calibrate);
 
+#ifdef CONFIG_X86_LOCAL_APIC
        lapic_timer_frequency = (freq * 1000) / HZ;
        pr_info("lapic_timer_frequency = %d\n", lapic_timer_frequency);
+#endif
 
        return 1;
 }
This page took 0.051267 seconds and 4 git commands to generate.