Lines Matching refs:rt_b
155 static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun);
159 struct rt_bandwidth *rt_b = in sched_rt_period_timer() local
167 overrun = hrtimer_forward(timer, now, rt_b->rt_period); in sched_rt_period_timer()
172 idle = do_sched_rt_period_timer(rt_b, overrun); in sched_rt_period_timer()
179 void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime) in init_rt_bandwidth() argument
181 rt_b->rt_period = ns_to_ktime(period); in init_rt_bandwidth()
182 rt_b->rt_runtime = runtime; in init_rt_bandwidth()
184 raw_spin_lock_init(&rt_b->rt_runtime_lock); in init_rt_bandwidth()
186 hrtimer_init(&rt_b->rt_period_timer, in init_rt_bandwidth()
188 rt_b->rt_period_timer.function = sched_rt_period_timer; in init_rt_bandwidth()
196 static void start_rt_bandwidth(struct rt_bandwidth *rt_b) in start_rt_bandwidth() argument
200 if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF) in start_rt_bandwidth()
203 if (hrtimer_active(&rt_b->rt_period_timer)) in start_rt_bandwidth()
206 raw_spin_lock(&rt_b->rt_runtime_lock); in start_rt_bandwidth()
211 if (hrtimer_active(&rt_b->rt_period_timer)) in start_rt_bandwidth()
214 now = hrtimer_cb_get_time(&rt_b->rt_period_timer); in start_rt_bandwidth()
215 hrtimer_forward(&rt_b->rt_period_timer, now, rt_b->rt_period); in start_rt_bandwidth()
217 soft = hrtimer_get_softexpires(&rt_b->rt_period_timer); in start_rt_bandwidth()
218 hard = hrtimer_get_expires(&rt_b->rt_period_timer); in start_rt_bandwidth()
220 __hrtimer_start_range_ns(&rt_b->rt_period_timer, soft, delta, in start_rt_bandwidth()
223 raw_spin_unlock(&rt_b->rt_runtime_lock); in start_rt_bandwidth()
227 static void destroy_rt_bandwidth(struct rt_bandwidth *rt_b) in destroy_rt_bandwidth() argument
229 hrtimer_cancel(&rt_b->rt_period_timer); in destroy_rt_bandwidth()