From 7185846301eec512047900643a136472381c98c7 Mon Sep 17 00:00:00 2001 From: "Huang, Tao" Date: Mon, 18 May 2015 18:22:30 +0800 Subject: [PATCH] arm64: rockchip: cpuquiet: be quiet when cpu up/down Signed-off-by: Huang, Tao --- arch/arm64/kernel/psci.c | 6 ++++++ arch/arm64/kernel/smp.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index 1cf83c2033e1..d356b8d4531c 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -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"); } diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 9a3c7ef182fd..b2fb1b4da677 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -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); /* -- 2.34.1