Lines Matching +full:de +full:- +full:rated

1 // SPDX-License-Identifier: GPL-2.0
6 * Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de>
7 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar
8 * Copyright(C) 2006-2007, Timesys Corp., Thomas Gleixner
24 #include "tick-internal.h"
58 static int tick_do_timer_boot_cpu __read_mostly = -1;
70 * tick_is_oneshot_available - check for a oneshot capable event device
76 if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT)) in tick_is_oneshot_available()
78 if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) in tick_is_oneshot_available()
111 ktime_t next = dev->next_event; in tick_handle_periodic()
117 * update_process_times() -> run_local_timers() -> in tick_handle_periodic()
120 if (IS_ENABLED(CONFIG_TICK_ONESHOT) && dev->event_handler != tick_handle_periodic) in tick_handle_periodic()
159 if ((dev->features & CLOCK_EVT_FEAT_PERIODIC) && in tick_setup_periodic()
194 if (!td->evtdev) { in tick_setup_device()
211 } else if (tick_do_timer_boot_cpu != -1 && !tick_nohz_full_cpu(cpu)) { in tick_setup_device()
212 tick_do_timer_boot_cpu = -1; in tick_setup_device()
229 td->mode = TICKDEV_MODE_PERIODIC; in tick_setup_device()
231 handler = td->evtdev->event_handler; in tick_setup_device()
232 next_event = td->evtdev->next_event; in tick_setup_device()
233 td->evtdev->event_handler = clockevents_handle_noop; in tick_setup_device()
236 td->evtdev = newdev; in tick_setup_device()
242 if (!cpumask_equal(newdev->cpumask, cpumask)) in tick_setup_device()
243 irq_set_affinity(newdev->irq, cpumask); in tick_setup_device()
255 if (td->mode == TICKDEV_MODE_PERIODIC) in tick_setup_device()
266 clockevents_exchange_device(td->evtdev, newdev); in tick_install_replacement()
268 if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) in tick_install_replacement()
275 if (!cpumask_test_cpu(cpu, newdev->cpumask)) in tick_check_percpu()
277 if (cpumask_equal(newdev->cpumask, cpumask_of(cpu))) in tick_check_percpu()
280 if (newdev->irq >= 0 && !irq_can_set_affinity(newdev->irq)) in tick_check_percpu()
283 if (curdev && cpumask_equal(curdev->cpumask, cpumask_of(cpu))) in tick_check_percpu()
292 if (!(newdev->features & CLOCK_EVT_FEAT_ONESHOT)) { in tick_check_preferred()
293 if (curdev && (curdev->features & CLOCK_EVT_FEAT_ONESHOT)) in tick_check_preferred()
300 * Use the higher rated one, but prefer a CPU local device with a lower in tick_check_preferred()
301 * rating than a non-CPU local device in tick_check_preferred()
304 newdev->rating > curdev->rating || in tick_check_preferred()
305 !cpumask_equal(curdev->cpumask, newdev->cpumask); in tick_check_preferred()
333 curdev = td->evtdev; in tick_check_new_device()
338 if (!try_module_get(newdev->owner)) in tick_check_new_device()
352 if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) in tick_check_new_device()
364 * tick_broadcast_oneshot_control - Enter/exit broadcast oneshot mode
368 * Returns 0 on success, -EBUSY if the cpu is used to broadcast wakeups.
378 if (!(td->evtdev->features & CLOCK_EVT_FEAT_C3STOP)) in tick_broadcast_oneshot_control()
423 struct clock_event_device *dev = td->evtdev; in tick_shutdown()
425 td->mode = TICKDEV_MODE_PERIODIC; in tick_shutdown()
433 dev->event_handler = clockevents_handle_noop; in tick_shutdown()
434 td->evtdev = NULL; in tick_shutdown()
440 * tick_suspend_local - Suspend the local tick device
450 clockevents_shutdown(td->evtdev); in tick_suspend_local()
454 * tick_resume_local - Resume the local tick device
465 clockevents_tick_resume(td->evtdev); in tick_resume_local()
467 if (td->mode == TICKDEV_MODE_PERIODIC) in tick_resume_local()
468 tick_setup_periodic(td->evtdev, 0); in tick_resume_local()
482 * tick_suspend - Suspend the tick and the broadcast device
497 * tick_resume - Resume the tick and the broadcast device
515 * tick_freeze - Suspend the local tick and (possibly) timekeeping.
542 * tick_unfreeze - Resume the local tick and (possibly) timekeeping.
565 tick_freeze_depth--; in tick_unfreeze()
572 * tick_init - initialize the tick control