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 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 | */ |
178 | struct hrtimer_cpu_base { | 179 | struct 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 | */ | ||
208 | struct 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 | |||
193 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 218 | static 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 | ||
384 | extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info); | ||
385 | extern 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 | |||
358 | extern int hrtimer_cancel(struct hrtimer *timer); | 390 | extern int hrtimer_cancel(struct hrtimer *timer); |
359 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 391 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
360 | 392 | ||