]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: sched_clock: Return suspended count earlier
authorStephen Boyd <sboyd@codeaurora.org>
Sun, 2 Jun 2013 06:39:39 +0000 (23:39 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Wed, 12 Jun 2013 21:02:12 +0000 (14:02 -0700)
commitbc49b26c81a5782969306bb2df43ed346593e3d3
tree80720ca392f1c4153cb0f85b18c1d25c984c0702
parent0dc6c0c5ebe6d95c1ce850d5d7bf9a32f4148607
ARM: sched_clock: Return suspended count earlier

If we're suspended and sched_clock() is called we're going to
read the hardware one more time and throw away that value and
return back the cached value we saved during the suspend
callback. This is wasteful. Let's short circuit all that and
return the cached value as early as possible if we're suspended.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
arch/arm/kernel/sched_clock.c