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,
Jason Wessel <jason.wessel@windriver.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 07/10] kgdb: Expose default CPUs roundup fallback mechanism
Date: Fri, 12 May 2023 14:48:53 +0100 [thread overview]
Message-ID: <20230512134853.GA216623@aspen.lan> (raw)
In-Reply-To: <20230419155341.v8.7.I21d92f8974c8e4001a5982fea6c98da1bed33ef5@changeid>
On Wed, Apr 19, 2023 at 03:56:01PM -0700, Douglas Anderson wrote:
> From: Sumit Garg <sumit.garg@linaro.org>
>
> Add a new API kgdb_smp_call_nmi_hook() to expose default CPUs roundup
> mechanism to a particular archichecture as a runtime fallback if it
> detects to not support NMI roundup.
>
> Currently such an architecture example is arm64 supporting pseudo NMIs
> feature which is only available on platforms which have support for GICv3
> or later version.
>
> 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)
>
> include/linux/kgdb.h | 12 ++++++++++++
> kernel/debug/debug_core.c | 8 +++++++-
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
> index 258cdde8d356..87713bd390f3 100644
> --- a/include/linux/kgdb.h
> +++ b/include/linux/kgdb.h
> @@ -199,6 +199,18 @@ kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffer,
>
> extern void kgdb_call_nmi_hook(void *ignored);
>
> +/**
> + * kgdb_smp_call_nmi_hook - Provide default fallback mechanism to
> + * round-up CPUs
> + *
> + * If you're using the default implementation of kgdb_roundup_cpus()
> + * this function will be called. And if an arch detects at runtime to
> + * not support NMI based roundup then it can fallback to default
> + * mechanism using this API.
> + */
> +
> +extern void kgdb_smp_call_nmi_hook(void);
Concept looks sensible but this is a terrible name for aa command to
round up the CPUs using smp_call... functions. Whilst it is true it that
kgdb_roundup_cpus() does use kgdb_call_nmi_hook() internally that
doesn't mean we should name functions after it. They should be named
after what they are do, not how they do it.
Something more like kgdb_roundup_cpus_with_smp_call() would be a much
better name.
Daniel.
next prev parent reply other threads:[~2023-05-12 13:49 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 [this message]
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
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=20230512134853.GA216623@aspen.lan \
--to=daniel.thompson@linaro.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dianders@chromium.org \
--cc=ito-yuichi@fujitsu.com \
--cc=jason.wessel@windriver.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=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).