summaryrefslogtreecommitdiff
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-12-15 13:44:28 +0300
committerIngo Molnar <mingo@kernel.org>2017-01-14 13:29:43 +0300
commit12907fbb1a691807bb0420a27126e15934cb7954 (patch)
tree14ba1797a6e24d566513b368c59b13948130dc40 /include/linux/clocksource.h
parentcb42c9a3ebbbb23448c3f9a25417fae6309b1a92 (diff)
downloadlinux-12907fbb1a691807bb0420a27126e15934cb7954.tar.xz
sched/clock, clocksource: Add optional cs::mark_unstable() method
PeterZ reported that we'd fail to mark the TSC unstable when the clocksource watchdog finds it unsuitable. Allow a clocksource to run a custom action when its being marked unstable and hook up the TSC unstable code. Reported-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index e315d04a2fd9..cfc75848a35d 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -62,6 +62,8 @@ struct module;
* @archdata: arch-specific data
* @suspend: suspend function for the clocksource, if necessary
* @resume: resume function for the clocksource, if necessary
+ * @mark_unstable: Optional function to inform the clocksource driver that
+ * the watchdog marked the clocksource unstable
* @owner: module reference, must be set by clocksource in modules
*
* Note: This struct is not used in hotpathes of the timekeeping code
@@ -93,6 +95,7 @@ struct clocksource {
unsigned long flags;
void (*suspend)(struct clocksource *cs);
void (*resume)(struct clocksource *cs);
+ void (*mark_unstable)(struct clocksource *cs);
/* private: */
#ifdef CONFIG_CLOCKSOURCE_WATCHDOG