@@ -533,12 +533,13 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
533533 struct clock_event_device * dev = __get_cpu_var (tick_cpu_device ).evtdev ;
534534 u64 time_delta ;
535535
536+ time_delta = timekeeping_max_deferment ();
537+
536538 /* Read jiffies and the time when jiffies were updated last */
537539 do {
538540 seq = read_seqbegin (& jiffies_lock );
539541 last_update = last_jiffies_update ;
540542 last_jiffies = jiffies ;
541- time_delta = timekeeping_max_deferment ();
542543 } while (read_seqretry (& jiffies_lock , seq ));
543544
544545 if (rcu_needs_cpu (cpu , & rcu_delta_jiffies ) ||
@@ -678,18 +679,18 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
678679static void tick_nohz_full_stop_tick (struct tick_sched * ts )
679680{
680681#ifdef CONFIG_NO_HZ_FULL
681- int cpu = smp_processor_id ();
682+ int cpu = smp_processor_id ();
682683
683- if (!tick_nohz_full_cpu (cpu ) || is_idle_task (current ))
684- return ;
684+ if (!tick_nohz_full_cpu (cpu ) || is_idle_task (current ))
685+ return ;
685686
686- if (!ts -> tick_stopped && ts -> nohz_mode == NOHZ_MODE_INACTIVE )
687- return ;
687+ if (!ts -> tick_stopped && ts -> nohz_mode == NOHZ_MODE_INACTIVE )
688+ return ;
688689
689- if (!can_stop_full_tick ())
690- return ;
690+ if (!can_stop_full_tick ())
691+ return ;
691692
692- tick_nohz_stop_sched_tick (ts , ktime_get (), cpu );
693+ tick_nohz_stop_sched_tick (ts , ktime_get (), cpu );
693694#endif
694695}
695696
@@ -1023,7 +1024,7 @@ static void tick_nohz_kick_tick(struct tick_sched *ts, ktime_t now)
10231024#endif
10241025}
10251026
1026- static inline void tick_check_nohz_this_cpu (void )
1027+ static inline void tick_nohz_irq_enter (void )
10271028{
10281029 struct tick_sched * ts = & __get_cpu_var (tick_cpu_sched );
10291030 ktime_t now ;
@@ -1042,17 +1043,17 @@ static inline void tick_check_nohz_this_cpu(void)
10421043#else
10431044
10441045static inline void tick_nohz_switch_to_nohz (void ) { }
1045- static inline void tick_check_nohz_this_cpu (void ) { }
1046+ static inline void tick_nohz_irq_enter (void ) { }
10461047
10471048#endif /* CONFIG_NO_HZ_COMMON */
10481049
10491050/*
10501051 * Called from irq_enter to notify about the possible interruption of idle()
10511052 */
1052- void tick_check_idle (void )
1053+ void tick_irq_enter (void )
10531054{
10541055 tick_check_oneshot_broadcast_this_cpu ();
1055- tick_check_nohz_this_cpu ();
1056+ tick_nohz_irq_enter ();
10561057}
10571058
10581059/*
0 commit comments