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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index 774a5a83c296..6240922e497c 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -1,6 +1,7 @@
1#include <linux/sched.h> 1#include <linux/sched.h>
2#include <linux/clocksource.h> 2#include <linux/clocksource.h>
3#include <linux/workqueue.h> 3#include <linux/workqueue.h>
4#include <linux/delay.h>
4#include <linux/cpufreq.h> 5#include <linux/cpufreq.h>
5#include <linux/jiffies.h> 6#include <linux/jiffies.h>
6#include <linux/init.h> 7#include <linux/init.h>
@@ -403,6 +404,7 @@ static inline void check_geode_tsc_reliable(void) { }
403void __init tsc_init(void) 404void __init tsc_init(void)
404{ 405{
405 int cpu; 406 int cpu;
407 u64 lpj;
406 408
407 if (!cpu_has_tsc || tsc_disabled > 0) 409 if (!cpu_has_tsc || tsc_disabled > 0)
408 return; 410 return;
@@ -415,6 +417,10 @@ void __init tsc_init(void)
415 return; 417 return;
416 } 418 }
417 419
420 lpj = ((u64)tsc_khz * 1000);
421 do_div(lpj, HZ);
422 lpj_fine = lpj;
423
418 /* now allow native_sched_clock() to use rdtsc */ 424 /* now allow native_sched_clock() to use rdtsc */
419 tsc_disabled = 0; 425 tsc_disabled = 0;
420 426