diff options
Diffstat (limited to 'include/linux/hrtimer.h')
| -rw-r--r-- | include/linux/hrtimer.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 56e56bcb6f0f..22627b3a33fe 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -161,8 +161,8 @@ enum hrtimer_base_type { | |||
| 161 | * @cpu: cpu number | 161 | * @cpu: cpu number |
| 162 | * @active_bases: Bitfield to mark bases with active timers | 162 | * @active_bases: Bitfield to mark bases with active timers |
| 163 | * @clock_was_set_seq: Sequence counter of clock was set events | 163 | * @clock_was_set_seq: Sequence counter of clock was set events |
| 164 | * @in_hrtirq: hrtimer_interrupt() is currently executing | ||
| 165 | * @hres_active: State of high resolution mode | 164 | * @hres_active: State of high resolution mode |
| 165 | * @in_hrtirq: hrtimer_interrupt() is currently executing | ||
| 166 | * @hang_detected: The last hrtimer interrupt detected a hang | 166 | * @hang_detected: The last hrtimer interrupt detected a hang |
| 167 | * @expires_next: absolute time of the next event, is required for remote | 167 | * @expires_next: absolute time of the next event, is required for remote |
| 168 | * hrtimer enqueue | 168 | * hrtimer enqueue |
| @@ -182,9 +182,9 @@ struct hrtimer_cpu_base { | |||
| 182 | unsigned int cpu; | 182 | unsigned int cpu; |
| 183 | unsigned int active_bases; | 183 | unsigned int active_bases; |
| 184 | unsigned int clock_was_set_seq; | 184 | unsigned int clock_was_set_seq; |
| 185 | unsigned int hres_active : 1; | ||
| 185 | #ifdef CONFIG_HIGH_RES_TIMERS | 186 | #ifdef CONFIG_HIGH_RES_TIMERS |
| 186 | unsigned int in_hrtirq : 1, | 187 | unsigned int in_hrtirq : 1, |
| 187 | hres_active : 1, | ||
| 188 | hang_detected : 1; | 188 | hang_detected : 1; |
| 189 | ktime_t expires_next; | 189 | ktime_t expires_next; |
| 190 | struct hrtimer *next_timer; | 190 | struct hrtimer *next_timer; |
| @@ -266,16 +266,17 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) | |||
| 266 | return timer->base->get_time(); | 266 | return timer->base->get_time(); |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static inline int hrtimer_is_hres_active(struct hrtimer *timer) | ||
| 270 | { | ||
| 271 | return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ? | ||
| 272 | timer->base->cpu_base->hres_active : 0; | ||
| 273 | } | ||
| 274 | |||
| 269 | #ifdef CONFIG_HIGH_RES_TIMERS | 275 | #ifdef CONFIG_HIGH_RES_TIMERS |
| 270 | struct clock_event_device; | 276 | struct clock_event_device; |
| 271 | 277 | ||
| 272 | extern void hrtimer_interrupt(struct clock_event_device *dev); | 278 | extern void hrtimer_interrupt(struct clock_event_device *dev); |
| 273 | 279 | ||
| 274 | static inline int hrtimer_is_hres_active(struct hrtimer *timer) | ||
| 275 | { | ||
| 276 | return timer->base->cpu_base->hres_active; | ||
| 277 | } | ||
| 278 | |||
| 279 | /* | 280 | /* |
| 280 | * The resolution of the clocks. The resolution value is returned in | 281 | * The resolution of the clocks. The resolution value is returned in |
| 281 | * the clock_getres() system call to give application programmers an | 282 | * the clock_getres() system call to give application programmers an |
| @@ -298,11 +299,6 @@ extern unsigned int hrtimer_resolution; | |||
| 298 | 299 | ||
| 299 | #define hrtimer_resolution (unsigned int)LOW_RES_NSEC | 300 | #define hrtimer_resolution (unsigned int)LOW_RES_NSEC |
| 300 | 301 | ||
| 301 | static inline int hrtimer_is_hres_active(struct hrtimer *timer) | ||
| 302 | { | ||
| 303 | return 0; | ||
| 304 | } | ||
| 305 | |||
| 306 | static inline void clock_was_set_delayed(void) { } | 302 | static inline void clock_was_set_delayed(void) { } |
| 307 | 303 | ||
| 308 | #endif | 304 | #endif |
