timers: Introduce function to check timer base is_idle flag
[linux-2.6-microblaze.git] / kernel / time / timer.c
index 4420cdf..e02ac46 100644 (file)
@@ -2159,6 +2159,16 @@ void timer_lock_remote_bases(unsigned int cpu)
        raw_spin_lock(&base_local->lock);
        raw_spin_lock_nested(&base_global->lock, SINGLE_DEPTH_NESTING);
 }
+
+/**
+ * timer_base_is_idle() - Return whether timer base is set idle
+ *
+ * Returns value of local timer base is_idle value.
+ */
+bool timer_base_is_idle(void)
+{
+       return __this_cpu_read(timer_bases[BASE_LOCAL].is_idle);
+}
 # endif /* CONFIG_SMP */
 
 static inline u64 __get_next_timer_interrupt(unsigned long basej, u64 basem,