Skip to content

Commit 02c0cd2

Browse files
lenbIngo Molnar
authored andcommitted
x86/tsc_msr: Remove irqoff around MSR-based TSC enumeration
Remove the irqoff/irqon around MSR-based TSC enumeration, as it is not necessary. Also rename: try_msr_calibrate_tsc() to cpu_khz_from_msr(), as that better describes what the routine does. Signed-off-by: Len Brown <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/a6b5c3ecd3b068175d2309599ab28163fc34215e.1466138954.git.len.brown@intel.com Signed-off-by: Ingo Molnar <[email protected]>
1 parent 6fcb41c commit 02c0cd2

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

arch/x86/include/asm/tsc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ extern int notsc_setup(char *);
5252
extern void tsc_save_sched_clock_state(void);
5353
extern void tsc_restore_sched_clock_state(void);
5454

55-
/* MSR based TSC calibration for Intel Atom SoC platforms */
56-
unsigned long try_msr_calibrate_tsc(void);
55+
unsigned long cpu_khz_from_msr(void);
5756

5857
#endif /* _ASM_X86_TSC_H */

arch/x86/kernel/tsc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,10 +674,7 @@ unsigned long native_calibrate_tsc(void)
674674
unsigned long flags, latch, ms, fast_calibrate;
675675
int hpet = is_hpet_enabled(), i, loopmin;
676676

677-
/* Calibrate TSC using MSR for Intel Atom SoCs */
678-
local_irq_save(flags);
679-
fast_calibrate = try_msr_calibrate_tsc();
680-
local_irq_restore(flags);
677+
fast_calibrate = cpu_khz_from_msr();
681678
if (fast_calibrate)
682679
return fast_calibrate;
683680

arch/x86/kernel/tsc_msr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int match_cpu(u8 family, u8 model)
6868
* Set global "lapic_timer_frequency" to bus_clock_cycles/jiffy
6969
* Return processor base frequency in KHz, or 0 on failure.
7070
*/
71-
unsigned long try_msr_calibrate_tsc(void)
71+
unsigned long cpu_khz_from_msr(void)
7272
{
7373
u32 lo, hi, ratio, freq_id, freq;
7474
unsigned long res;

0 commit comments

Comments
 (0)