Skip to content

Commit ca1e631

Browse files
author
H. Peter Anvin
committed
x86, tsc, apic: Unbreak static (MSR) calibration when CONFIG_X86_LOCAL_APIC=n
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/tip-rgm7xmg7k6qnjlw3ynkcjsmh@git.kernel.org Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Bin Gao <bin.gao@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 parent 7da7c15 commit ca1e631

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kernel/tsc_msr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ int try_msr_calibrate_tsc(unsigned long *fast_calibrate)
118118
*fast_calibrate = freq * ratio;
119119
pr_info("TSC runs at %lu KHz\n", *fast_calibrate);
120120

121+
#ifdef CONFIG_X86_LOCAL_APIC
121122
lapic_timer_frequency = (freq * 1000) / HZ;
122123
pr_info("lapic_timer_frequency = %d\n", lapic_timer_frequency);
124+
#endif
123125

124126
return 1;
125127
}

0 commit comments

Comments
 (0)