Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca1e631c authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

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: default avatarFengguang Wu <fengguang.wu@intel.com>
Cc: Bin Gao <bin.gao@intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 7da7c156
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}