From: Paul Cercueil <paul@crapouillou.net>
To: Florian Fainelli <f.fainelli@gmail.com>, linux-mips@vger.kernel.org
Cc: "Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Paul Burton" <paulburton@kernel.org>,
"Stephen Boyd" <sboyd@kernel.org>,
"Brian Masney" <bmasney+clk@redhat.com>,
"Jerome Brunet" <jbrunet+clk@baylibre.com>,
"周琰杰 (Zhou Yanjie)" <zhouyanjie@wanyeetech.com>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"open list" <linux-kernel@vger.kernel.org>,
"open list:COMMON CLK FRAMEWORK" <linux-clk@vger.kernel.org>,
hns@goldelico.com, paul@boddie.org.uk
Subject: Re: [PATCH v6 2/4] MIPS: Skip generic IPI setup for platform-specific callbacks
Date: Mon, 16 Nov 2026 17:06:57 +0100 [thread overview]
Message-ID: <7fc2ba5524ef5bc15286a26d5001481db1c2e6ac.camel@crapouillou.net> (raw)
In-Reply-To: <20261113190836.470937-3-f.fainelli@gmail.com>
Le vendredi 13 novembre 2026 à 11:08 -0800, Florian Fainelli a écrit :
> A generic MIPS kernel can select a platform SMP backend with direct IPI
> callbacks instead of an IPI IRQ domain. The XBurst backend uses CP0
> mailboxes, so generic IPI allocation would find no domain and BUG when
> more than one CPU is present.
>
> Skip generic IPI initialization when neither selected send callback uses
> the generic implementation. Keep initialization when either callback
> uses generic IRQ IPIs, and retain the existing single-CPU shortcut.
>
> Sashiko AI reported the XBurst integration issue; Codex assisted with
> the change and extracted-function/build checks.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Arg, I was reviewing the v5 and missed that you already sent the v6.
Anyway, LGTM.
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
> ---
> Changes in v6:
>
> - addded missing Signed-off-by tag
>
> Changes since previous posting:
> - Split the generic IPI initialization guard out of the XBurst SMP patch
> as a prerequisite, as requested by Paul Cercueil.
> - Add braces around the multi-line condition.
>
> arch/mips/kernel/smp.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
> index 0f28b4a62e72..086298146dd8 100644
> --- a/arch/mips/kernel/smp.c
> +++ b/arch/mips/kernel/smp.c
> @@ -338,8 +338,12 @@ int mips_smp_ipi_free(const struct cpumask *mask)
>
> static int __init mips_smp_ipi_init(void)
> {
> - if (num_possible_cpus() == 1)
> + /* Platforms with their own IPI callbacks do not need an IRQ domain.
> */
> + if ((mp_ops->send_ipi_single != mips_smp_send_ipi_single &&
> + mp_ops->send_ipi_mask != mips_smp_send_ipi_mask) ||
> + num_possible_cpus() == 1) {
> return 0;
> + }
>
> mips_smp_ipi_allocate(cpu_possible_mask);
>
next prev parent reply other threads:[~2026-11-16 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 19:08 [PATCH v6 0/4] MIPS: CI20: Enable SMP with two CPUs Florian Fainelli
2026-11-13 19:08 ` [PATCH v6 1/4] clk: ingenic: Poll JZ4780 CPU1 power status atomically Florian Fainelli
2026-11-13 19:08 ` [PATCH v6 2/4] MIPS: Skip generic IPI setup for platform-specific callbacks Florian Fainelli
2026-11-16 16:06 ` Paul Cercueil [this message]
2026-11-13 19:08 ` [PATCH v6 3/4] MIPS: Ingenic: Add XBurst SMP support Florian Fainelli
2026-11-16 16:07 ` Paul Cercueil
2026-11-13 19:08 ` [PATCH v6 4/4] MIPS: CI20: Enable SMP with two CPUs Florian Fainelli
2026-11-13 20:51 ` (subset) [PATCH v6 0/4] " Brian Masney
2026-11-13 21:52 ` Florian Fainelli
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=7fc2ba5524ef5bc15286a26d5001481db1c2e6ac.camel@crapouillou.net \
--to=paul@crapouillou.net \
--cc=bmasney+clk@redhat.com \
--cc=f.fainelli@gmail.com \
--cc=hns@goldelico.com \
--cc=jbrunet+clk@baylibre.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul@boddie.org.uk \
--cc=paulburton@kernel.org \
--cc=sboyd@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=zhouyanjie@wanyeetech.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
all inboxes | Powered by JetHome®