arm64: rockchip: cpuquiet: be quiet when cpu up/down
authorHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 10:22:30 +0000 (18:22 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 10:22:30 +0000 (18:22 +0800)
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
arch/arm64/kernel/psci.c
arch/arm64/kernel/smp.c

index 1cf83c2033e119b123a68f79c5af980e219bba7e..d356b8d4531c9a00e378a258e2a5e12f34d57979 100644 (file)
@@ -497,11 +497,17 @@ static int cpu_psci_cpu_kill(unsigned int cpu)
        for (i = 0; i < 10; i++) {
                err = psci_ops.affinity_info(cpu_logical_map(cpu), 0);
                if (err == PSCI_0_2_AFFINITY_LEVEL_OFF) {
+#ifdef CONFIG_CPUQUIET_FRAMEWORK
+                       if (system_state != SYSTEM_RUNNING)
+#endif
                        pr_info("CPU%d killed.\n", cpu);
                        return 1;
                }
 
                msleep(10);
+#ifdef CONFIG_CPUQUIET_FRAMEWORK
+               if (system_state != SYSTEM_RUNNING)
+#endif
                pr_info("Retrying again to check for CPU kill\n");
        }
 
index 9a3c7ef182fd773420df468daa1a25532d80391e..b2fb1b4da67764f40636104226a5d1c99f92a780 100644 (file)
@@ -140,6 +140,9 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
        cpumask_set_cpu(cpu, mm_cpumask(mm));
 
        set_my_cpu_offset(per_cpu_offset(smp_processor_id()));
+#ifdef CONFIG_CPUQUIET_FRAMEWORK
+       if (system_state != SYSTEM_RUNNING)
+#endif
        printk("CPU%u: Booted secondary processor\n", cpu);
 
        /*
@@ -261,6 +264,9 @@ void __cpu_die(unsigned int cpu)
                pr_crit("CPU%u: cpu didn't die\n", cpu);
                return;
        }
+#ifdef CONFIG_CPUQUIET_FRAMEWORK
+       if (system_state != SYSTEM_RUNNING)
+#endif
        pr_notice("CPU%u: shutdown\n", cpu);
 
        /*