aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tsc_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/tsc_32.c')
-rw-r--r--arch/x86/kernel/tsc_32.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index 2a7b95bd8509..43517e324be8 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -24,8 +24,6 @@ static int tsc_enabled;
24unsigned int tsc_khz; 24unsigned int tsc_khz;
25EXPORT_SYMBOL_GPL(tsc_khz); 25EXPORT_SYMBOL_GPL(tsc_khz);
26 26
27int tsc_disable;
28
29#ifdef CONFIG_X86_TSC 27#ifdef CONFIG_X86_TSC
30static int __init tsc_setup(char *str) 28static int __init tsc_setup(char *str)
31{ 29{
@@ -40,8 +38,7 @@ static int __init tsc_setup(char *str)
40 */ 38 */
41static int __init tsc_setup(char *str) 39static int __init tsc_setup(char *str)
42{ 40{
43 tsc_disable = 1; 41 setup_clear_cpu_cap(X86_FEATURE_TSC);
44
45 return 1; 42 return 1;
46} 43}
47#endif 44#endif
@@ -395,7 +392,7 @@ void __init tsc_init(void)
395{ 392{
396 int cpu; 393 int cpu;
397 394
398 if (!cpu_has_tsc || tsc_disable) 395 if (!cpu_has_tsc)
399 goto out_no_tsc; 396 goto out_no_tsc;
400 397
401 cpu_khz = calculate_cpu_khz(); 398 cpu_khz = calculate_cpu_khz();
@@ -439,10 +436,5 @@ void __init tsc_init(void)
439 return; 436 return;
440 437
441out_no_tsc: 438out_no_tsc:
442 /* 439 setup_clear_cpu_cap(X86_FEATURE_TSC);
443 * Set the tsc_disable flag if there's no TSC support, this
444 * makes it a fast flag for the kernel to see whether it
445 * should be using the TSC.
446 */
447 tsc_disable = 1;
448} 440}