diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-02-04 11:03:03 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-02-04 11:03:03 +0100 |
commit | 90889a635a9b5488624bccce3ff6b2eec68c007b (patch) | |
tree | 8ddde1e04060bd65ca2aafb09b38066cb7d69b4d /arch/x86/kernel/tsc.c | |
parent | Merge branch 'timers/for-arm' into timers/core (diff) | |
parent | timekeeping: Switch HAS_PERSISTENT_CLOCK to ALWAYS_USE_PERSISTENT_CLOCK (diff) | |
download | linux-90889a635a9b5488624bccce3ff6b2eec68c007b.tar.xz linux-90889a635a9b5488624bccce3ff6b2eec68c007b.zip |
Merge branch 'fortglx/3.9/time' of git://git.linaro.org/people/jstultz/linux into timers/core
Trivial conflict in arch/x86/Kconfig
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/tsc.c')
-rw-r--r-- | arch/x86/kernel/tsc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 06ccb5073a3f..4b9ea101fe3b 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -623,7 +623,8 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu) ns_now = __cycles_2_ns(tsc_now); if (cpu_khz) { - *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz; + *scale = ((NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR) + + cpu_khz / 2) / cpu_khz; *offset = ns_now - mult_frac(tsc_now, *scale, (1UL << CYC2NS_SCALE_FACTOR)); } |