clocksource: Add 'max_cycles' to 'struct clocksource'
authorJohn Stultz <john.stultz@linaro.org>
Thu, 12 Mar 2015 04:16:31 +0000 (21:16 -0700)
committerIngo Molnar <mingo@kernel.org>
Thu, 12 Mar 2015 09:16:38 +0000 (10:16 +0100)
commitfb82fe2fe8588745edd73aa3a6229facac5c1e15
tree1ab7c25dfa0e89f83f07fad2a04467d8c7864ebb
parent362fde0410377e468ca00ad363fdf3e3ec42eb6a
clocksource: Add 'max_cycles' to 'struct clocksource'

In order to facilitate clocksource validation, add a
'max_cycles' field to the clocksource structure which
will hold the maximum cycle value that can safely be
multiplied without potentially causing an overflow.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1426133800-29329-4-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/clocksource.h
kernel/time/clocksource.c
kernel/time/sched_clock.c