sched_clock: Use an hrtimer instead of timer
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 18 Jul 2013 23:21:16 +0000 (16:21 -0700)
committerAjay Nandakumar <anandakumarm@nvidia.com>
Mon, 13 Jan 2014 06:33:38 +0000 (11:33 +0530)
commit4bbc39f9f9053edebf3b925b981015467e145e5a
tree006467e0bf75deca8e1cb9902331303ba55f541a
parent960a26b631b402b13b83c22a2eaf263f4d16781b
sched_clock: Use an hrtimer instead of timer

In the next patch we're going to increase the number of bits that
the generic sched_clock can handle to be greater than 32. With
more than 32 bits the wraparound time can be larger than what can
fit into the units that msecs_to_jiffies takes (unsigned int).
Luckily, the wraparound is initially calculated in nanoseconds
which we can easily use with hrtimers, so switch to using an
hrtimer.

Bug 1399318

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[jstultz: Fixup hrtimer intitialization order issue]
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit a08ca5d1089da03724f96fa0870c64968e66765b)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Change-Id: I17a9bd3140e7f41f0985c070a14eea17696b3770
kernel/time/sched_clock.c