aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index fd0dc30c9f15..d91bba539ca8 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -174,6 +174,7 @@ enum hrtimer_base_type {
174 * @nr_hangs: Total number of hrtimer interrupt hangs 174 * @nr_hangs: Total number of hrtimer interrupt hangs
175 * @max_hang_time: Maximum time spent in hrtimer_interrupt 175 * @max_hang_time: Maximum time spent in hrtimer_interrupt
176 * @clock_base: array of clock bases for this cpu 176 * @clock_base: array of clock bases for this cpu
177 * @to_pull: LITMUS^RT list of timers to be pulled on this cpu
177 */ 178 */
178struct hrtimer_cpu_base { 179struct hrtimer_cpu_base {
179 raw_spinlock_t lock; 180 raw_spinlock_t lock;
@@ -188,8 +189,32 @@ struct hrtimer_cpu_base {
188 ktime_t max_hang_time; 189 ktime_t max_hang_time;
189#endif 190#endif
190 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; 191 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
192 struct list_head to_pull;
191}; 193};
192 194
195#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
196
197#define HRTIMER_START_ON_INACTIVE 0
198#define HRTIMER_START_ON_QUEUED 1
199
200/*
201 * struct hrtimer_start_on_info - save timer info on remote cpu
202 * @list: list of hrtimer_start_on_info on remote cpu (to_pull)
203 * @timer: timer to be triggered on remote cpu
204 * @time: time event
205 * @mode: timer mode
206 * @state: activity flag
207 */
208struct hrtimer_start_on_info {
209 struct list_head list;
210 struct hrtimer *timer;
211 ktime_t time;
212 enum hrtimer_mode mode;
213 atomic_t state;
214};
215
216#endif
217
193static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) 218static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
194{ 219{
195 timer->node.expires = time; 220 timer->node.expires = time;
@@ -355,6 +380,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
355 unsigned long delta_ns, 380 unsigned long delta_ns,
356 const enum hrtimer_mode mode, int wakeup); 381 const enum hrtimer_mode mode, int wakeup);
357 382
383#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
384extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info);
385extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info,
386 struct hrtimer *timer, ktime_t time,
387 const enum hrtimer_mode mode);
388#endif
389
358extern int hrtimer_cancel(struct hrtimer *timer); 390extern int hrtimer_cancel(struct hrtimer *timer);
359extern int hrtimer_try_to_cancel(struct hrtimer *timer); 391extern int hrtimer_try_to_cancel(struct hrtimer *timer);
360 392