tick-sched.c (1913c7f3fc2514e09262baf2267a82dfdb215c39) tick-sched.c (01b4c39901e087ceebae2733857248de81476bd8)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de>
4 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar
5 * Copyright(C) 2006-2007 Timesys Corp., Thomas Gleixner
6 *
7 * No idle tick implementation for low and high resolution timers
8 *

--- 184 unchanged lines hidden (view full) ---

193 return true;
194 }
195
196 if (val & TICK_DEP_MASK_CLOCK_UNSTABLE) {
197 trace_tick_stop(0, TICK_DEP_MASK_CLOCK_UNSTABLE);
198 return true;
199 }
200
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de>
4 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar
5 * Copyright(C) 2006-2007 Timesys Corp., Thomas Gleixner
6 *
7 * No idle tick implementation for low and high resolution timers
8 *

--- 184 unchanged lines hidden (view full) ---

193 return true;
194 }
195
196 if (val & TICK_DEP_MASK_CLOCK_UNSTABLE) {
197 trace_tick_stop(0, TICK_DEP_MASK_CLOCK_UNSTABLE);
198 return true;
199 }
200
201 if (val & TICK_DEP_MASK_RCU) {
202 trace_tick_stop(0, TICK_DEP_MASK_RCU);
203 return true;
204 }
205
201 return false;
202}
203
204static bool can_stop_full_tick(int cpu, struct tick_sched *ts)
205{
206 lockdep_assert_irqs_disabled();
207
208 if (unlikely(!cpu_online(cpu)))

--- 110 unchanged lines hidden (view full) ---

319 } else {
320 /* Remote irq work not NMI-safe */
321 if (!WARN_ON_ONCE(in_nmi()))
322 tick_nohz_full_kick_cpu(cpu);
323 }
324 preempt_enable();
325 }
326}
206 return false;
207}
208
209static bool can_stop_full_tick(int cpu, struct tick_sched *ts)
210{
211 lockdep_assert_irqs_disabled();
212
213 if (unlikely(!cpu_online(cpu)))

--- 110 unchanged lines hidden (view full) ---

324 } else {
325 /* Remote irq work not NMI-safe */
326 if (!WARN_ON_ONCE(in_nmi()))
327 tick_nohz_full_kick_cpu(cpu);
328 }
329 preempt_enable();
330 }
331}
332EXPORT_SYMBOL_GPL(tick_nohz_dep_set_cpu);
327
328void tick_nohz_dep_clear_cpu(int cpu, enum tick_dep_bits bit)
329{
330 struct tick_sched *ts = per_cpu_ptr(&tick_cpu_sched, cpu);
331
332 atomic_andnot(BIT(bit), &ts->tick_dep_mask);
333}
333
334void tick_nohz_dep_clear_cpu(int cpu, enum tick_dep_bits bit)
335{
336 struct tick_sched *ts = per_cpu_ptr(&tick_cpu_sched, cpu);
337
338 atomic_andnot(BIT(bit), &ts->tick_dep_mask);
339}
340EXPORT_SYMBOL_GPL(tick_nohz_dep_clear_cpu);
334
335/*
336 * Set a per-task tick dependency. Posix CPU timers need this in order to elapse
337 * per task timers.
338 */
339void tick_nohz_dep_set_task(struct task_struct *tsk, enum tick_dep_bits bit)
340{
341 /*

--- 1073 unchanged lines hidden ---
341
342/*
343 * Set a per-task tick dependency. Posix CPU timers need this in order to elapse
344 * per task timers.
345 */
346void tick_nohz_dep_set_task(struct task_struct *tsk, enum tick_dep_bits bit)
347{
348 /*

--- 1073 unchanged lines hidden ---