From: Pramod Kumar <pramod.kumar@broadcom.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>
Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Dave Martin <dave.martin@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh@kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Steve Capper <steve.capper@arm.com>,
BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Pramod Kumar <pramod.kumar@broadcom.com>
Subject: [PATCH INTERNAL RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported
Date: Fri, 18 Jan 2019 11:15:00 +0530 [thread overview]
Message-ID: <1547790300-6190-1-git-send-email-pramod.kumar@broadcom.com> (raw)
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
reply other threads:[~2019-01-18 5:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1547790300-6190-1-git-send-email-pramod.kumar@broadcom.com \
--to=pramod.kumar@broadcom.com \
--cc=Suzuki.Poulose@arm.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=catalin.marinas@arm.com \
--cc=dave.martin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=robh@kernel.org \
--cc=steve.capper@arm.com \
--cc=sudeep.holla@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).