.. | .. |
---|
42 | 42 | HRTIMER_MODE_REL = 0x01, |
---|
43 | 43 | HRTIMER_MODE_PINNED = 0x02, |
---|
44 | 44 | HRTIMER_MODE_SOFT = 0x04, |
---|
| 45 | + HRTIMER_MODE_HARD = 0x08, |
---|
45 | 46 | |
---|
46 | 47 | HRTIMER_MODE_ABS_PINNED = HRTIMER_MODE_ABS | HRTIMER_MODE_PINNED, |
---|
47 | 48 | HRTIMER_MODE_REL_PINNED = HRTIMER_MODE_REL | HRTIMER_MODE_PINNED, |
---|
.. | .. |
---|
52 | 53 | HRTIMER_MODE_ABS_PINNED_SOFT = HRTIMER_MODE_ABS_PINNED | HRTIMER_MODE_SOFT, |
---|
53 | 54 | HRTIMER_MODE_REL_PINNED_SOFT = HRTIMER_MODE_REL_PINNED | HRTIMER_MODE_SOFT, |
---|
54 | 55 | |
---|
| 56 | + HRTIMER_MODE_ABS_HARD = HRTIMER_MODE_ABS | HRTIMER_MODE_HARD, |
---|
| 57 | + HRTIMER_MODE_REL_HARD = HRTIMER_MODE_REL | HRTIMER_MODE_HARD, |
---|
| 58 | + |
---|
| 59 | + HRTIMER_MODE_ABS_PINNED_HARD = HRTIMER_MODE_ABS_PINNED | HRTIMER_MODE_HARD, |
---|
| 60 | + HRTIMER_MODE_REL_PINNED_HARD = HRTIMER_MODE_REL_PINNED | HRTIMER_MODE_HARD, |
---|
55 | 61 | }; |
---|
56 | 62 | |
---|
57 | 63 | /* |
---|
.. | .. |
---|
189 | 195 | * @nr_retries: Total number of hrtimer interrupt retries |
---|
190 | 196 | * @nr_hangs: Total number of hrtimer interrupt hangs |
---|
191 | 197 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
---|
| 198 | + * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are |
---|
| 199 | + * expired |
---|
192 | 200 | * @expires_next: absolute time of the next event, is required for remote |
---|
193 | 201 | * hrtimer enqueue; it is the total first expiry time (hard |
---|
194 | 202 | * and soft hrtimer are taken into account) |
---|
.. | .. |
---|
216 | 224 | unsigned short nr_hangs; |
---|
217 | 225 | unsigned int max_hang_time; |
---|
218 | 226 | #endif |
---|
| 227 | + spinlock_t softirq_expiry_lock; |
---|
219 | 228 | ktime_t expires_next; |
---|
220 | 229 | struct hrtimer *next_timer; |
---|
221 | 230 | ktime_t softirq_expires_next; |
---|
.. | .. |
---|
353 | 362 | /* Initialize timers: */ |
---|
354 | 363 | extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, |
---|
355 | 364 | enum hrtimer_mode mode); |
---|
| 365 | +extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, clockid_t clock_id, |
---|
| 366 | + enum hrtimer_mode mode, |
---|
| 367 | + struct task_struct *task); |
---|
356 | 368 | |
---|
357 | 369 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS |
---|
358 | 370 | extern void hrtimer_init_on_stack(struct hrtimer *timer, clockid_t which_clock, |
---|
359 | 371 | enum hrtimer_mode mode); |
---|
| 372 | +extern void hrtimer_init_sleeper_on_stack(struct hrtimer_sleeper *sl, |
---|
| 373 | + clockid_t clock_id, |
---|
| 374 | + enum hrtimer_mode mode, |
---|
| 375 | + struct task_struct *task); |
---|
360 | 376 | |
---|
361 | 377 | extern void destroy_hrtimer_on_stack(struct hrtimer *timer); |
---|
362 | 378 | #else |
---|
.. | .. |
---|
366 | 382 | { |
---|
367 | 383 | hrtimer_init(timer, which_clock, mode); |
---|
368 | 384 | } |
---|
| 385 | + |
---|
| 386 | +static inline void hrtimer_init_sleeper_on_stack(struct hrtimer_sleeper *sl, |
---|
| 387 | + clockid_t clock_id, |
---|
| 388 | + enum hrtimer_mode mode, |
---|
| 389 | + struct task_struct *task) |
---|
| 390 | +{ |
---|
| 391 | + hrtimer_init_sleeper(sl, clock_id, mode, task); |
---|
| 392 | +} |
---|
| 393 | + |
---|
369 | 394 | static inline void destroy_hrtimer_on_stack(struct hrtimer *timer) { } |
---|
370 | 395 | #endif |
---|
371 | 396 | |
---|
.. | .. |
---|
389 | 414 | |
---|
390 | 415 | extern int hrtimer_cancel(struct hrtimer *timer); |
---|
391 | 416 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
---|
| 417 | +extern void hrtimer_grab_expiry_lock(const struct hrtimer *timer); |
---|
392 | 418 | |
---|
393 | 419 | static inline void hrtimer_start_expires(struct hrtimer *timer, |
---|
394 | 420 | enum hrtimer_mode mode) |
---|
.. | .. |
---|
474 | 500 | extern long hrtimer_nanosleep(const struct timespec64 *rqtp, |
---|
475 | 501 | const enum hrtimer_mode mode, |
---|
476 | 502 | const clockid_t clockid); |
---|
477 | | - |
---|
478 | | -extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, |
---|
479 | | - struct task_struct *tsk); |
---|
480 | 503 | |
---|
481 | 504 | extern int schedule_hrtimeout_range(ktime_t *expires, u64 delta, |
---|
482 | 505 | const enum hrtimer_mode mode); |
---|