]> git.baikalelectronics.ru Git - kernel.git/commit
sched/x86/tsc: Initialize multiplier to 0
authorPeter Zijlstra <peterz@infradead.org>
Wed, 22 Jan 2014 21:08:14 +0000 (22:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 23 Jan 2014 13:48:36 +0000 (14:48 +0100)
commit4a304e2821a0d0e0062a5c68795d210089f3575d
treed2608d056fbb0ccf2c47e7d3cc648b2fed0753e2
parent06485c5b7ab45ff0587701e51f74818bb13f0aa8
sched/x86/tsc: Initialize multiplier to 0

Since we keep the clock value linearly continuous on frequency change,
make sure the initial multiplier is 0, such that our initial value is 0.
Without this we compute the initial value at whatever the TSC has
managed to reach since power-on.

Reported-and-Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Fixes: cdd6d66e9a80c ("sched/clock, x86: Rewrite cyc2ns() to avoid the need to disable IRQs")
Cc: lenb@kernel.org
Cc: rjw@rjwysocki.net
Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: rui.zhang@intel.com
Cc: jacob.jun.pan@linux.intel.com
Cc: Mike Galbraith <bitbucket@online.de>
Cc: hpa@zytor.com
Cc: paulmck@linux.vnet.ibm.com
Cc: John Stultz <john.stultz@linaro.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: dyoung@redhat.com
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140123094804.GP30183@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/tsc.c