From f7b6deefc98af759ec845331a7dd442e826c089c Mon Sep 17 00:00:00 2001 From: Youngtae Lee Date: Mon, 23 Apr 2018 20:16:21 +0900 Subject: [PATCH] cpu: change order and mehod for sched_active/deactive Change-Id: Ia456ad0febd5c63be8390f74ec6a80c6a60499f4 Signed-off-by: Youngtae Lee --- kernel/cpu.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/cpu.c b/kernel/cpu.c index 88d60f12e763..0c0e84af9c25 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #define CREATE_TRACE_POINTS @@ -926,6 +927,14 @@ static int __ref _cpus_down(struct cpumask cpus, int tasks_frozen, cpumask_set_cpu(cpu, &take_down_cpus); } + for_each_cpu(cpu, &ap_work_cpus) { + struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); + set_cpu_active(cpu, false); + st->state = CPUHP_AP_EXYNOS_IDLE_CTRL; + } + + cpuset_update_active_cpus(); + for_each_cpu(cpu, &ap_work_cpus) { st = per_cpu_ptr(&cpuhp_state, cpu); set_cpu_active(cpu, false); -- 2.20.1