rcu: Make CPU_DYING_IDLE an explicit call
[deliverable/linux.git] / kernel / sched / idle.c
index 544a7133cbd1df2a6ee4369231148fc0309eae11..bd12c6c714ecea0718565df4539304e3bf9d9e57 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/sched.h>
 #include <linux/cpu.h>
 #include <linux/cpuidle.h>
+#include <linux/cpuhotplug.h>
 #include <linux/tick.h>
 #include <linux/mm.h>
 #include <linux/stackprotector.h>
@@ -193,8 +194,6 @@ exit_idle:
        rcu_idle_exit();
 }
 
-DEFINE_PER_CPU(bool, cpu_dead_idle);
-
 /*
  * Generic idle loop implementation
  *
@@ -221,10 +220,7 @@ static void cpu_idle_loop(void)
                        rmb();
 
                        if (cpu_is_offline(smp_processor_id())) {
-                               rcu_cpu_notify(NULL, CPU_DYING_IDLE,
-                                              (void *)(long)smp_processor_id());
-                               smp_mb(); /* all activity before dead. */
-                               this_cpu_write(cpu_dead_idle, true);
+                               cpuhp_report_idle_dead();
                                arch_cpu_idle_dead();
                        }
 
@@ -291,5 +287,6 @@ void cpu_startup_entry(enum cpuhp_state state)
        boot_init_stack_canary();
 #endif
        arch_cpu_idle_prepare();
+       cpuhp_online_idle(state);
        cpu_idle_loop();
 }
This page took 0.026962 seconds and 5 git commands to generate.