ARM: Fix negative idle stats for offline cpu

file:c05612e06b11e6b6ba5bba5d195fcd2bd9cffb90 -> file:4995d4b62a495587b0a246ba9da9f66a5f759dc5
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -229,11 +229,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();
@@ -259,6 +254,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
}
}