--- c132e8145754c3b9a8ea8d5e1a82a2467f707795 +++ 5592e164a190d75ffa7d040314518037eaa45481 @@ -226,11 +226,6 @@ void cpu_idle(void) idle_notifier_call_chain(IDLE_START); tick_nohz_stop_sched_tick(1); while (!need_resched()) { -#ifdef CONFIG_HOTPLUG_CPU - if (cpu_is_offline(smp_processor_id())) - cpu_die(); -#endif - local_irq_disable(); #ifdef CONFIG_PL310_ERRATA_769419 wmb(); @@ -256,6 +251,10 @@ void cpu_idle(void) preempt_enable_no_resched(); schedule(); preempt_disable(); +#ifdef CONFIG_HOTPLUG_CPU + if (cpu_is_offline(smp_processor_id())) + cpu_die(); +#endif } }