hrtimer: Prepare support for PREEMPT_RT
[sfrench/cifs-2.6.git] / include / linux / hrtimer.h
index 7d0d0a36a8f492431d62ba845ce7a77ae348c3ce..5df4bcff96d5871a60392de07d702f8e1892a265 100644 (file)
@@ -192,6 +192,10 @@ enum  hrtimer_base_type {
  * @nr_retries:                Total number of hrtimer interrupt retries
  * @nr_hangs:          Total number of hrtimer interrupt hangs
  * @max_hang_time:     Maximum time spent in hrtimer_interrupt
+ * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are
+ *                      expired
+ * @timer_waiters:     A hrtimer_cancel() invocation waits for the timer
+ *                     callback to finish.
  * @expires_next:      absolute time of the next event, is required for remote
  *                     hrtimer enqueue; it is the total first expiry time (hard
  *                     and soft hrtimer are taken into account)
@@ -218,6 +222,10 @@ struct hrtimer_cpu_base {
        unsigned short                  nr_retries;
        unsigned short                  nr_hangs;
        unsigned int                    max_hang_time;
+#endif
+#ifdef CONFIG_PREEMPT_RT
+       spinlock_t                      softirq_expiry_lock;
+       atomic_t                        timer_waiters;
 #endif
        ktime_t                         expires_next;
        struct hrtimer                  *next_timer;
@@ -350,6 +358,14 @@ extern void hrtimers_resume(void);
 
 DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
 
+#ifdef CONFIG_PREEMPT_RT
+void hrtimer_cancel_wait_running(const struct hrtimer *timer);
+#else
+static inline void hrtimer_cancel_wait_running(struct hrtimer *timer)
+{
+       cpu_relax();
+}
+#endif
 
 /* Exported timer functions: */