|
@@ -161,8 +161,8 @@ enum hrtimer_base_type {
|
|
|
* @cpu: cpu number
|
|
|
* @active_bases: Bitfield to mark bases with active timers
|
|
|
* @clock_was_set_seq: Sequence counter of clock was set events
|
|
|
- * @in_hrtirq: hrtimer_interrupt() is currently executing
|
|
|
* @hres_active: State of high resolution mode
|
|
|
+ * @in_hrtirq: hrtimer_interrupt() is currently executing
|
|
|
* @hang_detected: The last hrtimer interrupt detected a hang
|
|
|
* @expires_next: absolute time of the next event, is required for remote
|
|
|
* hrtimer enqueue
|
|
@@ -182,9 +182,9 @@ struct hrtimer_cpu_base {
|
|
|
unsigned int cpu;
|
|
|
unsigned int active_bases;
|
|
|
unsigned int clock_was_set_seq;
|
|
|
+ unsigned int hres_active : 1;
|
|
|
#ifdef CONFIG_HIGH_RES_TIMERS
|
|
|
unsigned int in_hrtirq : 1,
|
|
|
- hres_active : 1,
|
|
|
hang_detected : 1;
|
|
|
ktime_t expires_next;
|
|
|
struct hrtimer *next_timer;
|
|
@@ -266,16 +266,17 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
|
|
|
return timer->base->get_time();
|
|
|
}
|
|
|
|
|
|
+static inline int hrtimer_is_hres_active(struct hrtimer *timer)
|
|
|
+{
|
|
|
+ return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ?
|
|
|
+ timer->base->cpu_base->hres_active : 0;
|
|
|
+}
|
|
|
+
|
|
|
#ifdef CONFIG_HIGH_RES_TIMERS
|
|
|
struct clock_event_device;
|
|
|
|
|
|
extern void hrtimer_interrupt(struct clock_event_device *dev);
|
|
|
|
|
|
-static inline int hrtimer_is_hres_active(struct hrtimer *timer)
|
|
|
-{
|
|
|
- return timer->base->cpu_base->hres_active;
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* The resolution of the clocks. The resolution value is returned in
|
|
|
* the clock_getres() system call to give application programmers an
|
|
@@ -298,11 +299,6 @@ extern unsigned int hrtimer_resolution;
|
|
|
|
|
|
#define hrtimer_resolution (unsigned int)LOW_RES_NSEC
|
|
|
|
|
|
-static inline int hrtimer_is_hres_active(struct hrtimer *timer)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
static inline void clock_was_set_delayed(void) { }
|
|
|
|
|
|
#endif
|