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 2/2] arm64: Implement panic_smp_self_stop()
Date: Tue, 11 Jun 2019 21:10:50 +0300 [thread overview]
Message-ID: <20190611181050.9647-2-aaro.koskinen@iki.fi> (raw)
In-Reply-To: <20190611181050.9647-1-aaro.koskinen@iki.fi>
From: Aaro Koskinen <aaro.koskinen@nokia.com>
Currently arm64 uses the default implementation of panic_smp_self_stop()
that is simply a cpu_relax() loop. As a result, when two CPUs panic()
simultaneously we get "SMP: failed to stop secondary CPUs" warnings and
extra delays before a reset.
Provide an implementation of panic_smp_self_stop() that offlines the
CPU properly.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.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 1a1b96a50245..5e09e5032409 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -857,6 +857,11 @@ static void ipi_cpu_stop(unsigned int cpu)
cpu_park_loop();
}
+void panic_smp_self_stop(void)
+{
+ ipi_cpu_stop(smp_processor_id());
+}
+
#ifdef CONFIG_KEXEC_CORE
static atomic_t waiting_for_crash_ipi = ATOMIC_INIT(0);
#endif
--
2.17.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-11 18:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 18:10 [PATCH 1/2] arm64: Improve parking of stopped CPUs Aaro Koskinen
2019-06-11 18:10 ` Aaro Koskinen [this message]
2019-06-12 15:18 ` [PATCH 2/2] arm64: Implement panic_smp_self_stop() James Morse
2019-06-12 22:38 ` Aaro Koskinen
2019-06-13 9:21 ` Will Deacon
2019-06-13 9:22 ` [PATCH 1/2] arm64: Improve parking of stopped CPUs Will Deacon
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=20190611181050.9647-2-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).