+3
-1
include/linux/hrtimer.h
+3
-1
include/linux/hrtimer.h
···
157
157
* @max_hang_time: Maximum time spent in hrtimer_interrupt
158
158
* @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are
159
159
* expired
160
+
* @online: CPU is online from an hrtimers point of view
160
161
* @timer_waiters: A hrtimer_cancel() invocation waits for the timer
161
162
* callback to finish.
162
163
* @expires_next: absolute time of the next event, is required for remote
···
180
179
unsigned int hres_active : 1,
181
180
in_hrtirq : 1,
182
181
hang_detected : 1,
183
-
softirq_activated : 1;
182
+
softirq_activated : 1,
183
+
online : 1;
184
184
#ifdef CONFIG_HIGH_RES_TIMERS
185
185
unsigned int nr_events;
186
186
unsigned short nr_retries;
+3
kernel/time/hrtimer.c
+3
kernel/time/hrtimer.c
···
1085
1085
enum hrtimer_mode mode)
1086
1086
{
1087
1087
debug_activate(timer, mode);
1088
+
WARN_ON_ONCE(!base->cpu_base->online);
1088
1089
1089
1090
base->cpu_base->active_bases |= 1 << base->index;
1090
1091
···
2184
2183
cpu_base->softirq_next_timer = NULL;
2185
2184
cpu_base->expires_next = KTIME_MAX;
2186
2185
cpu_base->softirq_expires_next = KTIME_MAX;
2186
+
cpu_base->online = 1;
2187
2187
hrtimer_cpu_base_init_expiry_lock(cpu_base);
2188
2188
return 0;
2189
2189
}
···
2252
2250
smp_call_function_single(ncpu, retrigger_next_event, NULL, 0);
2253
2251
2254
2252
raw_spin_unlock(&new_base->lock);
2253
+
old_base->online = 0;
2255
2254
raw_spin_unlock(&old_base->lock);
2256
2255
2257
2256
return 0;