ARM64: dts: rockchip: enable tsadc node for rk3366-tb
[firefly-linux-kernel-4.4.55.git] / kernel / cpu.c
index 85ff5e26e23b45b34201120c758082599f995b7e..37731292f8a160581fb1309984ad754effe12306 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/irq.h>
 #include <trace/events/power.h>
 
+#include <trace/events/sched.h>
+
 #include "smpboot.h"
 
 #ifdef CONFIG_SMP
@@ -425,6 +427,7 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen)
 
 out_release:
        cpu_hotplug_done();
+       trace_sched_cpu_hotplug(cpu, err, 0);
        if (!err)
                cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu);
        return err;
@@ -530,6 +533,7 @@ out_notify:
                __cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL);
 out:
        cpu_hotplug_done();
+       trace_sched_cpu_hotplug(cpu, ret, 1);
 
        return ret;
 }
@@ -827,3 +831,23 @@ void init_cpu_online(const struct cpumask *src)
 {
        cpumask_copy(to_cpumask(cpu_online_bits), src);
 }
+
+static ATOMIC_NOTIFIER_HEAD(idle_notifier);
+
+void idle_notifier_register(struct notifier_block *n)
+{
+       atomic_notifier_chain_register(&idle_notifier, n);
+}
+EXPORT_SYMBOL_GPL(idle_notifier_register);
+
+void idle_notifier_unregister(struct notifier_block *n)
+{
+       atomic_notifier_chain_unregister(&idle_notifier, n);
+}
+EXPORT_SYMBOL_GPL(idle_notifier_unregister);
+
+void idle_notifier_call_chain(unsigned long val)
+{
+       atomic_notifier_call_chain(&idle_notifier, val, NULL);
+}
+EXPORT_SYMBOL_GPL(idle_notifier_call_chain);