linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported
@ 2019-01-18  5:46 Pramod Kumar
  2019-01-18 11:32 ` Sudeep Holla
  2019-01-23 16:56 ` Mark Rutland
  0 siblings, 2 replies; 17+ messages in thread
From: Pramod Kumar @ 2019-01-18  5:46 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Suzuki K Poulose, Sudeep Holla, Dave Martin, Mark Rutland,
	Rob Herring, Lorenzo Pieralisi, Steve Capper,
	BCM Kernel Feedback, linux-arm-kernel, linux-kernel,
	Pramod Kumar

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@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.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


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-01-25 16:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18  5:46 [PATCH RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported Pramod Kumar
2019-01-18 11:32 ` Sudeep Holla
     [not found]   ` <CAJ+tv6+6yqT1xkmkY3x6SNQ83K+J6zqKZr7PV5A_ffvyEzceqg@mail.gmail.com>
     [not found]     ` <CAJ+tv6KqynSf5t_VwLqpdM4BF+wLWcJ0wPTD4nWqL4ej1Yih4g@mail.gmail.com>
2019-01-21  6:06       ` Pramod Kumar
2019-01-23 16:48       ` Mark Rutland
2019-01-23 17:05         ` Scott Branden
2019-01-23 17:21           ` Sudeep Holla
2019-01-23 17:33             ` Scott Branden
2019-01-23 17:33           ` Mark Rutland
2019-01-23 17:46             ` Scott Branden
2019-01-23 18:07               ` Sudeep Holla
2019-01-25  7:03             ` Pramod Kumar
2019-01-25 15:56               ` Robin Murphy
2019-01-25 16:52               ` Sudeep Holla
2019-01-21 11:22     ` Sudeep Holla
2019-01-23  4:51       ` Pramod Kumar
2019-01-23 16:27         ` Sudeep Holla
2019-01-23 16:56 ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).