Lines Matching refs:cpu_base

160 			raw_spin_lock_irqsave(&base->cpu_base->lock, *flags);  in lock_hrtimer_base()
164 raw_spin_unlock_irqrestore(&base->cpu_base->lock, *flags); in lock_hrtimer_base()
183 if (!new_base->cpu_base->hres_active) in hrtimer_check_target()
187 return expires.tv64 <= new_base->cpu_base->expires_next.tv64; in hrtimer_check_target()
225 raw_spin_unlock(&base->cpu_base->lock); in switch_hrtimer_base()
226 raw_spin_lock(&new_base->cpu_base->lock); in switch_hrtimer_base()
230 raw_spin_unlock(&new_base->cpu_base->lock); in switch_hrtimer_base()
231 raw_spin_lock(&base->cpu_base->lock); in switch_hrtimer_base()
252 raw_spin_lock_irqsave(&base->cpu_base->lock, *flags); in lock_hrtimer_base()
446 static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base) in __hrtimer_get_next_event() argument
448 struct hrtimer_clock_base *base = cpu_base->clock_base; in __hrtimer_get_next_event()
522 hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) in hrtimer_force_reprogram() argument
524 ktime_t expires_next = __hrtimer_get_next_event(cpu_base); in hrtimer_force_reprogram()
526 if (skip_equal && expires_next.tv64 == cpu_base->expires_next.tv64) in hrtimer_force_reprogram()
529 cpu_base->expires_next.tv64 = expires_next.tv64; in hrtimer_force_reprogram()
545 if (cpu_base->hang_detected) in hrtimer_force_reprogram()
548 if (cpu_base->expires_next.tv64 != KTIME_MAX) in hrtimer_force_reprogram()
549 tick_program_event(cpu_base->expires_next, 1); in hrtimer_force_reprogram()
569 struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); in hrtimer_reprogram() local
594 if (expires.tv64 >= cpu_base->expires_next.tv64) in hrtimer_reprogram()
603 if (cpu_base->in_hrtirq) in hrtimer_reprogram()
612 if (cpu_base->hang_detected) in hrtimer_reprogram()
620 cpu_base->expires_next = expires; in hrtimer_reprogram()
795 raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags); in unlock_hrtimer_base()
853 base->cpu_base->active_bases |= 1 << base->index; in enqueue_hrtimer()
892 if (base->cpu_base->expires_next.tv64 == expires.tv64) in __remove_hrtimer()
893 hrtimer_force_reprogram(base->cpu_base, 1); in __remove_hrtimer()
898 base->cpu_base->active_bases &= ~(1 << base->index); in __remove_hrtimer()
923 reprogram = base->cpu_base == this_cpu_ptr(&hrtimer_bases); in remove_hrtimer()
982 wake_up_nohz_cpu(new_base->cpu_base->cpu); in __hrtimer_start_range_ns()
983 } else if (new_base->cpu_base == this_cpu_ptr(&hrtimer_bases) && in __hrtimer_start_range_ns()
996 raw_spin_unlock(&new_base->cpu_base->lock); in __hrtimer_start_range_ns()
1123 struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); in hrtimer_get_next_event() local
1127 raw_spin_lock_irqsave(&cpu_base->lock, flags); in hrtimer_get_next_event()
1130 mindelta = ktime_sub(__hrtimer_get_next_event(cpu_base), in hrtimer_get_next_event()
1133 raw_spin_unlock_irqrestore(&cpu_base->lock, flags); in hrtimer_get_next_event()
1144 struct hrtimer_cpu_base *cpu_base; in __hrtimer_init() local
1149 cpu_base = raw_cpu_ptr(&hrtimer_bases); in __hrtimer_init()
1155 timer->base = &cpu_base->clock_base[base]; in __hrtimer_init()
1189 struct hrtimer_cpu_base *cpu_base; in hrtimer_get_res() local
1192 cpu_base = raw_cpu_ptr(&hrtimer_bases); in hrtimer_get_res()
1193 *tp = ktime_to_timespec(cpu_base->clock_base[base].resolution); in hrtimer_get_res()
1202 struct hrtimer_cpu_base *cpu_base = base->cpu_base; in __run_hrtimer() local
1218 raw_spin_unlock(&cpu_base->lock); in __run_hrtimer()
1222 raw_spin_lock(&cpu_base->lock); in __run_hrtimer()
1247 struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); in hrtimer_interrupt() local
1251 BUG_ON(!cpu_base->hres_active); in hrtimer_interrupt()
1252 cpu_base->nr_events++; in hrtimer_interrupt()
1255 raw_spin_lock(&cpu_base->lock); in hrtimer_interrupt()
1256 entry_time = now = hrtimer_update_base(cpu_base); in hrtimer_interrupt()
1258 cpu_base->in_hrtirq = 1; in hrtimer_interrupt()
1266 cpu_base->expires_next.tv64 = KTIME_MAX; in hrtimer_interrupt()
1273 if (!(cpu_base->active_bases & (1 << i))) in hrtimer_interrupt()
1276 base = cpu_base->clock_base + i; in hrtimer_interrupt()
1303 expires_next = __hrtimer_get_next_event(cpu_base); in hrtimer_interrupt()
1308 cpu_base->expires_next = expires_next; in hrtimer_interrupt()
1309 cpu_base->in_hrtirq = 0; in hrtimer_interrupt()
1310 raw_spin_unlock(&cpu_base->lock); in hrtimer_interrupt()
1315 cpu_base->hang_detected = 0; in hrtimer_interrupt()
1332 raw_spin_lock(&cpu_base->lock); in hrtimer_interrupt()
1333 now = hrtimer_update_base(cpu_base); in hrtimer_interrupt()
1334 cpu_base->nr_retries++; in hrtimer_interrupt()
1343 cpu_base->nr_hangs++; in hrtimer_interrupt()
1344 cpu_base->hang_detected = 1; in hrtimer_interrupt()
1345 raw_spin_unlock(&cpu_base->lock); in hrtimer_interrupt()
1347 if (delta.tv64 > cpu_base->max_hang_time.tv64) in hrtimer_interrupt()
1348 cpu_base->max_hang_time = delta; in hrtimer_interrupt()
1437 struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); in hrtimer_run_queues() local
1445 base = &cpu_base->clock_base[index]; in hrtimer_run_queues()
1450 hrtimer_get_softirq_time(cpu_base); in hrtimer_run_queues()
1454 raw_spin_lock(&cpu_base->lock); in hrtimer_run_queues()
1466 raw_spin_unlock(&cpu_base->lock); in hrtimer_run_queues()
1619 struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu); in init_hrtimers_cpu() local
1623 cpu_base->clock_base[i].cpu_base = cpu_base; in init_hrtimers_cpu()
1624 timerqueue_init_head(&cpu_base->clock_base[i].active); in init_hrtimers_cpu()
1627 cpu_base->cpu = cpu; in init_hrtimers_cpu()
1628 hrtimer_init_hres(cpu_base); in init_hrtimers_cpu()