diff options
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index cc07d2777bb..6eb8bc57e42 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -175,6 +175,7 @@ enum hrtimer_base_type { | |||
175 | * @nr_hangs: Total number of hrtimer interrupt hangs | 175 | * @nr_hangs: Total number of hrtimer interrupt hangs |
176 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 176 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
177 | * @clock_base: array of clock bases for this cpu | 177 | * @clock_base: array of clock bases for this cpu |
178 | * @to_pull: LITMUS^RT list of timers to be pulled on this cpu | ||
178 | */ | 179 | */ |
179 | struct hrtimer_cpu_base { | 180 | struct hrtimer_cpu_base { |
180 | raw_spinlock_t lock; | 181 | raw_spinlock_t lock; |
@@ -190,8 +191,32 @@ struct hrtimer_cpu_base { | |||
190 | ktime_t max_hang_time; | 191 | ktime_t max_hang_time; |
191 | #endif | 192 | #endif |
192 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | 193 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; |
194 | struct list_head to_pull; | ||
193 | }; | 195 | }; |
194 | 196 | ||
197 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
198 | |||
199 | #define HRTIMER_START_ON_INACTIVE 0 | ||
200 | #define HRTIMER_START_ON_QUEUED 1 | ||
201 | |||
202 | /* | ||
203 | * struct hrtimer_start_on_info - save timer info on remote cpu | ||
204 | * @list: list of hrtimer_start_on_info on remote cpu (to_pull) | ||
205 | * @timer: timer to be triggered on remote cpu | ||
206 | * @time: time event | ||
207 | * @mode: timer mode | ||
208 | * @state: activity flag | ||
209 | */ | ||
210 | struct hrtimer_start_on_info { | ||
211 | struct list_head list; | ||
212 | struct hrtimer *timer; | ||
213 | ktime_t time; | ||
214 | enum hrtimer_mode mode; | ||
215 | atomic_t state; | ||
216 | }; | ||
217 | |||
218 | #endif | ||
219 | |||
195 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 220 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
196 | { | 221 | { |
197 | timer->node.expires = time; | 222 | timer->node.expires = time; |
@@ -363,6 +388,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
363 | unsigned long delta_ns, | 388 | unsigned long delta_ns, |
364 | const enum hrtimer_mode mode, int wakeup); | 389 | const enum hrtimer_mode mode, int wakeup); |
365 | 390 | ||
391 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
392 | extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info); | ||
393 | extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info, | ||
394 | struct hrtimer *timer, ktime_t time, | ||
395 | const enum hrtimer_mode mode); | ||
396 | #endif | ||
397 | |||
366 | extern int hrtimer_cancel(struct hrtimer *timer); | 398 | extern int hrtimer_cancel(struct hrtimer *timer); |
367 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 399 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
368 | 400 | ||