[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1547790380-6276-1-git-send-email-pramod.kumar@broadcom.com>
Date: Fri, 18 Jan 2019 11:16:20 +0530
From: Pramod Kumar <pramod.kumar@...adcom.com>
To: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>
Cc: Suzuki K Poulose <Suzuki.Poulose@....com>,
Sudeep Holla <sudeep.holla@....com>,
Dave Martin <dave.martin@....com>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <robh@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Steve Capper <steve.capper@....com>,
BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Pramod Kumar <pramod.kumar@...adcom.com>
Subject: [PATCH RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported
If CPU hotplug is supported, ipi_cpu_stop should use PSCI cpudie
call to stop the CPU. This call ensures L1/L2 cache flush,
CPUs cache-cohenrecy setting w.r.to interconnect.
Apart from this, this gives control to f/w to reduce power consumption
by take appropriate decesion on power rails for plugging-out core.
Signed-off-by: Pramod Kumar <pramod.kumar@...adcom.com>
Reviewed-by: Ray Jui <ray.jui@...adcom.com>
Reviewed-by: Scott Branden <scott.branden@...adcom.com>
---
arch/arm64/kernel/smp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 1598d6f..360e52b 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -822,8 +822,13 @@ static void ipi_cpu_stop(unsigned int cpu)
local_daif_mask();
sdei_mask_local_cpu();
+#ifdef CONFIG_HOTPLUG_CPU
+ if (cpu_ops[cpu]->cpu_die)
+ cpu_ops[cpu]->cpu_die(cpu);
+#else
while (1)
cpu_relax();
+#endif
}
#ifdef CONFIG_KEXEC_CORE
--
1.9.1
Powered by blists - more mailing lists