timers, sched/clock: Remove suspend from clock_read_data()
authorDaniel Thompson <daniel.thompson@linaro.org>
Thu, 26 Mar 2015 19:23:24 +0000 (12:23 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 27 Mar 2015 07:33:58 +0000 (08:33 +0100)
commit13dbeb384d2d3aa555ea48d511e8cb110bd172e0
treea368f8a4eaeec87369c337b0d677f8d18a065dd6
parentcf7c9c170787d6870af54684822f58acc00a966c
timers, sched/clock: Remove suspend from clock_read_data()

Currently cd.read_data.suspended is read by the hotpath function
sched_clock(). This variable need not be accessed on the
hotpath. In fact, once it is removed, we can remove the
conditional branches from sched_clock() and install a dummy
read_sched_clock function to suspend the clock.

The new master copy of the function pointer
(actual_read_sched_clock) is introduced and is used for all
reads of the clock hardware except those within sched_clock
itself.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/r/1427397806-20889-4-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/time/sched_clock.c