diff options
Diffstat (limited to 'kernel/time/hrtimer.c')
| -rw-r--r-- | kernel/time/hrtimer.c | 25 | 
1 files changed, 13 insertions, 12 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index edb0f821dcea..70625dff62ce 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -38,6 +38,7 @@  #include <linux/sched/deadline.h>  #include <linux/sched/nohz.h>  #include <linux/sched/debug.h> +#include <linux/sched/isolation.h>  #include <linux/timer.h>  #include <linux/freezer.h>  #include <linux/compat.h> @@ -746,7 +747,7 @@ static void hrtimer_switch_to_hres(void)  	base->hres_active = 1;  	hrtimer_resolution = HIGH_RES_NSEC; -	tick_setup_sched_timer(); +	tick_setup_sched_timer(true);  	/* "Retrigger" the interrupt to get things going */  	retrigger_next_event(NULL);  } @@ -1021,21 +1022,23 @@ void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)  }  /** - * hrtimer_forward - forward the timer expiry + * hrtimer_forward() - forward the timer expiry   * @timer:	hrtimer to forward   * @now:	forward past this time   * @interval:	the interval to forward   *   * Forward the timer expiry so it will expire in the future. - * Returns the number of overruns.   * - * Can be safely called from the callback function of @timer. If - * called from other contexts @timer must neither be enqueued nor - * running the callback and the caller needs to take care of - * serialization. + * .. note:: + *  This only updates the timer expiry value and does not requeue the timer.   * - * Note: This only updates the timer expiry value and does not requeue - * the timer. + * There is also a variant of the function hrtimer_forward_now(). + * + * Context: Can be safely called from the callback function of @timer. If called + *          from other contexts @timer must neither be enqueued nor running the + *          callback and the caller needs to take care of serialization. + * + * Return: The number of overruns are returned.   */  u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)  { @@ -2223,10 +2226,8 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,  int hrtimers_cpu_dying(unsigned int dying_cpu)  { +	int i, ncpu = cpumask_any_and(cpu_active_mask, housekeeping_cpumask(HK_TYPE_TIMER));  	struct hrtimer_cpu_base *old_base, *new_base; -	int i, ncpu = cpumask_first(cpu_active_mask); - -	tick_cancel_sched_timer(dying_cpu);  	old_base = this_cpu_ptr(&hrtimer_bases);  	new_base = &per_cpu(hrtimer_bases, ncpu);  |