From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
James Morse <james.morse@arm.com>,
Jayachandran Chandrasekharan Nair <jnair@marvell.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>,
linux-arm-kernel@lists.infradead.org,
Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: [PATCH v2 1/2] arm64: Improve parking of stopped CPUs
Date: Mon, 17 Jun 2019 23:35:18 +0300 [thread overview]
Message-ID: <20190617203519.328-1-aaro.koskinen@iki.fi> (raw)
From: Jayachandran C <jnair@caviumnetworks.com>
The current code puts the stopped cpus in an 'yield' instruction loop.
Using a busy loop here is unnecessary, we can use the cpu_park_loop()
function here to do a wfi/wfe.
Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
---
v2: Add Acked-by
v1: https://patchwork.kernel.org/patch/10988099/
arch/arm64/kernel/smp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index bb4b3f07761a..1a1b96a50245 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -854,9 +854,7 @@ static void ipi_cpu_stop(unsigned int cpu)
local_daif_mask();
sdei_mask_local_cpu();
-
- while (1)
- cpu_relax();
+ cpu_park_loop();
}
#ifdef CONFIG_KEXEC_CORE
--
2.17.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-06-17 20:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 20:35 Aaro Koskinen [this message]
2019-06-17 20:35 ` [PATCH v2 2/2] arm64: Implement panic_smp_self_stop() Aaro Koskinen
2019-06-18 12:51 ` Will Deacon
2019-06-25 15:43 ` [PATCH v2 1/2] arm64: Improve parking of stopped CPUs Catalin Marinas
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=20190617203519.328-1-aaro.koskinen@iki.fi \
--to=aaro.koskinen@iki.fi \
--cc=aaro.koskinen@nokia.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=jnair@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--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).