summaryrefslogtreecommitdiffstats
path: root/include/linux/tick.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-06-12 11:29:27 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-06-13 12:00:26 +0200
commitcd6d95d8449b7c9f415f26041e9ae173d387b6bd (patch)
treeddd1f2d6436f398419045b3e0ee860c01523cfea /include/linux/tick.h
parent3f68535adad8dd89499505a65fb25d0e02d118cc (diff)
downloadop-kernel-dev-cd6d95d8449b7c9f415f26041e9ae173d387b6bd.zip
op-kernel-dev-cd6d95d8449b7c9f415f26041e9ae173d387b6bd.tar.gz
clocksource: prevent selection of low resolution clocksourse also for nohz=on
commit 3f68535adad (clocksource: sanity check sysfs clocksource changes) prevents selection of non high resolution capable clocksources when high resolution mode is active, but did not take into account that the same rules apply for highres=off nohz=on. Check the tick device mode instead of hrtimer_hres_active() to verify whether the system needs to be protected from a switch to jiffies or other non highres capable clock sources. Reported-by: Luming Yu <luming.yu@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/tick.h')
-rw-r--r--include/linux/tick.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 469b82d..0482229 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -97,10 +97,12 @@ extern void tick_clock_notify(void);
extern int tick_check_oneshot_change(int allow_nohz);
extern struct tick_sched *tick_get_tick_sched(int cpu);
extern void tick_check_idle(int cpu);
+extern int tick_oneshot_mode_active(void);
# else
static inline void tick_clock_notify(void) { }
static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
static inline void tick_check_idle(int cpu) { }
+static inline int tick_oneshot_mode_active(void) { return 0; }
# endif
#else /* CONFIG_GENERIC_CLOCKEVENTS */
@@ -109,6 +111,7 @@ static inline void tick_cancel_sched_timer(int cpu) { }
static inline void tick_clock_notify(void) { }
static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
static inline void tick_check_idle(int cpu) { }
+static inline int tick_oneshot_mode_active(void) { return 0; }
#endif /* !CONFIG_GENERIC_CLOCKEVENTS */
# ifdef CONFIG_NO_HZ
OpenPOWER on IntegriCloud