Skip to content

Commit

Permalink
x86, tsc, apic: Unbreak static (MSR) calibration when CONFIG_X86_LOCA…
Browse files Browse the repository at this point in the history
…L_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>
  • Loading branch information
H. Peter Anvin committed Jan 16, 2014
1 parent 7da7c15 commit ca1e631
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/tsc_msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit ca1e631

Please sign in to comment.