• Home
  • Raw
  • Download

Lines Matching refs:base

140 	struct hrtimer_clock_base *base;  in lock_hrtimer_base()  local
143 base = timer->base; in lock_hrtimer_base()
144 if (likely(base != &migration_base)) { in lock_hrtimer_base()
145 raw_spin_lock_irqsave(&base->cpu_base->lock, *flags); in lock_hrtimer_base()
146 if (likely(base == timer->base)) in lock_hrtimer_base()
147 return base; in lock_hrtimer_base()
149 raw_spin_unlock_irqrestore(&base->cpu_base->lock, *flags); in lock_hrtimer_base()
180 struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base, in get_target_base() argument
183 if (pinned || !base->migration_enabled) in get_target_base()
184 return base; in get_target_base()
189 struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base, in get_target_base() argument
192 return base; in get_target_base()
209 switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base, in switch_hrtimer_base() argument
214 int basenum = base->index; in switch_hrtimer_base()
221 if (base != new_base) { in switch_hrtimer_base()
232 return base; in switch_hrtimer_base()
235 timer->base = &migration_base; in switch_hrtimer_base()
236 raw_spin_unlock(&base->cpu_base->lock); in switch_hrtimer_base()
242 raw_spin_lock(&base->cpu_base->lock); in switch_hrtimer_base()
244 timer->base = base; in switch_hrtimer_base()
247 timer->base = new_base; in switch_hrtimer_base()
263 struct hrtimer_clock_base *base = timer->base; in lock_hrtimer_base() local
265 raw_spin_lock_irqsave(&base->cpu_base->lock, *flags); in lock_hrtimer_base()
267 return base; in lock_hrtimer_base()
465 struct hrtimer_clock_base *base = cpu_base->clock_base; in __hrtimer_get_next_event() local
470 for (; active; base++, active >>= 1) { in __hrtimer_get_next_event()
477 next = timerqueue_getnext(&base->active); in __hrtimer_get_next_event()
479 expires = ktime_sub(hrtimer_get_expires(timer), base->offset); in __hrtimer_get_next_event()
496 static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base) in hrtimer_update_base() argument
498 ktime_t *offs_real = &base->clock_base[HRTIMER_BASE_REALTIME].offset; in hrtimer_update_base()
499 ktime_t *offs_boot = &base->clock_base[HRTIMER_BASE_BOOTTIME].offset; in hrtimer_update_base()
500 ktime_t *offs_tai = &base->clock_base[HRTIMER_BASE_TAI].offset; in hrtimer_update_base()
502 return ktime_get_update_offsets_now(&base->clock_was_set_seq, in hrtimer_update_base()
595 struct hrtimer_clock_base *base) in hrtimer_reprogram() argument
598 ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset); in hrtimer_reprogram()
606 if (base->cpu_base != cpu_base) in hrtimer_reprogram()
652 static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) in hrtimer_init_hres() argument
654 base->expires_next.tv64 = KTIME_MAX; in hrtimer_init_hres()
655 base->hang_detected = 0; in hrtimer_init_hres()
656 base->hres_active = 0; in hrtimer_init_hres()
657 base->next_timer = NULL; in hrtimer_init_hres()
667 struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases); in retrigger_next_event() local
669 if (!base->hres_active) in retrigger_next_event()
672 raw_spin_lock(&base->lock); in retrigger_next_event()
673 hrtimer_update_base(base); in retrigger_next_event()
674 hrtimer_force_reprogram(base, 0); in retrigger_next_event()
675 raw_spin_unlock(&base->lock); in retrigger_next_event()
683 struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases); in hrtimer_switch_to_hres() local
687 "mode on CPU %d\n", base->cpu); in hrtimer_switch_to_hres()
690 base->hres_active = 1; in hrtimer_switch_to_hres()
721 hrtimer_force_reprogram(struct hrtimer_cpu_base *base, int skip_equal) { } in hrtimer_force_reprogram() argument
723 struct hrtimer_clock_base *base) in hrtimer_reprogram() argument
727 static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) { } in hrtimer_init_hres() argument
803 raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags); in unlock_hrtimer_base()
867 struct hrtimer_clock_base *base) in enqueue_hrtimer() argument
871 base->cpu_base->active_bases |= 1 << base->index; in enqueue_hrtimer()
875 return timerqueue_add(&base->active, &timer->node); in enqueue_hrtimer()
889 struct hrtimer_clock_base *base, in __remove_hrtimer() argument
892 struct hrtimer_cpu_base *cpu_base = base->cpu_base; in __remove_hrtimer()
899 if (!timerqueue_del(&base->active, &timer->node)) in __remove_hrtimer()
900 cpu_base->active_bases &= ~(1 << base->index); in __remove_hrtimer()
920 remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, bool restart) in remove_hrtimer() argument
936 reprogram = base->cpu_base == this_cpu_ptr(&hrtimer_bases); in remove_hrtimer()
941 __remove_hrtimer(timer, base, state, reprogram); in remove_hrtimer()
974 struct hrtimer_clock_base *base, *new_base; in hrtimer_start_range_ns() local
978 base = lock_hrtimer_base(timer, &flags); in hrtimer_start_range_ns()
981 remove_hrtimer(timer, base, true); in hrtimer_start_range_ns()
984 tim = ktime_add_safe(tim, base->get_time()); in hrtimer_start_range_ns()
991 new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED); in hrtimer_start_range_ns()
1026 struct hrtimer_clock_base *base; in hrtimer_try_to_cancel() local
1039 base = lock_hrtimer_base(timer, &flags); in hrtimer_try_to_cancel()
1042 ret = remove_hrtimer(timer, base, false); in hrtimer_try_to_cancel()
1118 int base = hrtimer_clock_to_base_table[clock_id]; in hrtimer_clockid_to_base() local
1120 if (likely(base != HRTIMER_MAX_CLOCK_BASES)) in hrtimer_clockid_to_base()
1121 return base; in hrtimer_clockid_to_base()
1131 int base; in __hrtimer_init() local
1145 base = hrtimer_clockid_to_base(clock_id); in __hrtimer_init()
1146 timer->base = &cpu_base->clock_base[base]; in __hrtimer_init()
1183 cpu_base = READ_ONCE(timer->base->cpu_base); in hrtimer_active()
1191 cpu_base != READ_ONCE(timer->base->cpu_base)); in hrtimer_active()
1216 struct hrtimer_clock_base *base, in __run_hrtimer() argument
1236 __remove_hrtimer(timer, base, HRTIMER_STATE_INACTIVE, 0); in __run_hrtimer()
1270 enqueue_hrtimer(timer, base); in __run_hrtimer()
1287 struct hrtimer_clock_base *base = cpu_base->clock_base; in __hrtimer_run_queues() local
1290 for (; active; base++, active >>= 1) { in __hrtimer_run_queues()
1297 basenow = ktime_add(now, base->offset); in __hrtimer_run_queues()
1299 while ((node = timerqueue_getnext(&base->active))) { in __hrtimer_run_queues()
1319 __run_hrtimer(cpu_base, base, timer, &basenow); in __hrtimer_run_queues()
1583 restart->nanosleep.clockid = t.timer.base->clockid; in hrtimer_nanosleep()
1645 timer->base = new_base; in migrate_hrtimer_list()