aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-06-12 05:29:27 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-06-13 06:00:26 -0400
commitcd6d95d8449b7c9f415f26041e9ae173d387b6bd (patch)
treeddd1f2d6436f398419045b3e0ee860c01523cfea /kernel/hrtimer.c
parent3f68535adad8dd89499505a65fb25d0e02d118cc (diff)
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 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 1a70c18cdffe..cb8a15c19583 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -476,7 +476,7 @@ static inline int hrtimer_is_hres_enabled(void)
476/* 476/*
477 * Is the high resolution mode active ? 477 * Is the high resolution mode active ?
478 */ 478 */
479int hrtimer_hres_active(void) 479static inline int hrtimer_hres_active(void)
480{ 480{
481 return __get_cpu_var(hrtimer_bases).hres_active; 481 return __get_cpu_var(hrtimer_bases).hres_active;
482} 482}
@@ -704,7 +704,7 @@ static int hrtimer_switch_to_hres(void)
704 704
705#else 705#else
706 706
707int hrtimer_hres_active(void) { return 0; } 707static inline int hrtimer_hres_active(void) { return 0; }
708static inline int hrtimer_is_hres_enabled(void) { return 0; } 708static inline int hrtimer_is_hres_enabled(void) { return 0; }
709static inline int hrtimer_switch_to_hres(void) { return 0; } 709static inline int hrtimer_switch_to_hres(void) { return 0; }
710static inline void hrtimer_force_reprogram(struct hrtimer_cpu_base *base) { } 710static inline void hrtimer_force_reprogram(struct hrtimer_cpu_base *base) { }