From: Daniel Thompson <daniel.thompson@linaro.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Sumit Garg <sumit.garg@linaro.org>,
Marc Zyngier <maz@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
ito-yuichi@fujitsu.com, kgdb-bugreport@lists.sourceforge.net,
Chen-Yu Tsai <wens@csie.org>,
Masayoshi Mizuma <msys.mizuma@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Ard Biesheuvel <ardb@kernel.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
linux-arm-kernel@lists.infradead.org,
Stephen Boyd <swboyd@chromium.org>,
Lecopzer Chen <lecopzer.chen@mediatek.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-perf-users@vger.kernel.org,
Alexandru Elisei <alexandru.elisei@arm.com>,
Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 09/10] arm64: kgdb: Roundup cpus using IPI as NMI
Date: Fri, 12 May 2023 15:00:51 +0100 [thread overview]
Message-ID: <20230512140051.GA217273@aspen.lan> (raw)
In-Reply-To: <20230419155341.v8.9.I2ef26d1b3bfbed2d10a281942b0da7d9854de05e@changeid>
On Wed, Apr 19, 2023 at 03:56:03PM -0700, Douglas Anderson wrote:
> From: Sumit Garg <sumit.garg@linaro.org>
>
> arm64 platforms with GICv3 or later supports pseudo NMIs which can be
> leveraged to roundup CPUs which are stuck in hard lockup state with
> interrupts disabled that wouldn't be possible with a normal IPI.
>
> So instead switch to roundup CPUs using IPI turned as NMI. And in
> case a particular arm64 platform doesn't supports pseudo NMIs,
> it will switch back to default kgdb CPUs roundup mechanism.
>
> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> Tested-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
> (no changes since v1)
>
> arch/arm64/kernel/ipi_nmi.c | 5 +++++
> arch/arm64/kernel/kgdb.c | 18 ++++++++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/arch/arm64/kernel/ipi_nmi.c b/arch/arm64/kernel/ipi_nmi.c
> index c592e92b8cbf..2adaaf1519e5 100644
> --- a/arch/arm64/kernel/ipi_nmi.c
> +++ b/arch/arm64/kernel/ipi_nmi.c
> @@ -8,6 +8,7 @@
>
> #include <linux/interrupt.h>
> #include <linux/irq.h>
> +#include <linux/kgdb.h>
> #include <linux/nmi.h>
> #include <linux/smp.h>
>
> @@ -45,10 +46,14 @@ bool arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
> static irqreturn_t ipi_nmi_handler(int irq, void *data)
> {
> irqreturn_t ret = IRQ_NONE;
> + unsigned int cpu = smp_processor_id();
Does this play nice with CONFIG_DEBUG_PREEMPT? I may have missed
something about the NMI entry but a quick scan of the arm64
arch_irq_disabled() suggests that debug_smp_processor_id() will issue
warnings at this point...
Other than I didn't see anything I don't like here.
Daniel.
next prev parent reply other threads:[~2023-05-12 14:01 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 22:55 [PATCH v8 00/10] arm64: Add framework to turn an IPI as NMI Douglas Anderson
2023-04-19 22:55 ` [PATCH v8 01/10] arm64: Add framework to turn " Douglas Anderson
2023-04-19 22:55 ` [PATCH v8 02/10] irqchip/gic-v3: Enable support for SGIs to act as NMIs Douglas Anderson
2023-04-19 22:55 ` [PATCH v8 03/10] arm64: smp: Assign and setup an IPI as NMI Douglas Anderson
2023-04-24 17:53 ` Doug Anderson
2023-04-19 22:55 ` [PATCH v8 04/10] nmi: backtrace: Allow runtime arch specific override Douglas Anderson
2023-04-19 22:55 ` [PATCH v8 05/10] arm64: ipi_nmi: Add support for NMI backtrace Douglas Anderson
2023-04-19 22:56 ` [PATCH v8 06/10] arm64: idle: Tag the arm64 idle functions as __cpuidle Douglas Anderson
2023-05-10 16:43 ` Mark Rutland
2023-05-10 21:13 ` Doug Anderson
2023-04-19 22:56 ` [PATCH v8 07/10] kgdb: Expose default CPUs roundup fallback mechanism Douglas Anderson
2023-05-12 13:48 ` Daniel Thompson
2023-05-15 23:21 ` Doug Anderson
2023-06-01 21:47 ` Doug Anderson
2023-04-19 22:56 ` [PATCH v8 08/10] kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB Douglas Anderson
2023-05-11 14:34 ` Doug Anderson
2023-05-12 13:52 ` Daniel Thompson
2023-04-19 22:56 ` [PATCH v8 09/10] arm64: kgdb: Roundup cpus using IPI as NMI Douglas Anderson
2023-05-12 14:00 ` Daniel Thompson [this message]
2023-05-15 23:11 ` Doug Anderson
2023-04-19 22:56 ` [PATCH v8 10/10] arm64: ipi_nmi: Fallback to a regular IPI if NMI isn't enabled Douglas Anderson
2023-05-10 15:28 ` [PATCH v8 00/10] arm64: Add framework to turn an IPI as NMI Doug Anderson
2023-05-10 16:30 ` Mark Rutland
2023-05-10 16:42 ` Doug Anderson
2023-05-16 10:09 ` Sumit Garg
2023-06-01 21:46 ` Doug Anderson
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=20230512140051.GA217273@aspen.lan \
--to=daniel.thompson@linaro.org \
--cc=alexandru.elisei@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dianders@chromium.org \
--cc=ito-yuichi@fujitsu.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=lecopzer.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=m.mizuma@jp.fujitsu.com \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=msys.mizuma@gmail.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sumit.garg@linaro.org \
--cc=swboyd@chromium.org \
--cc=tglx@linutronix.de \
--cc=wens@csie.org \
--cc=will@kernel.org \
/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).