From: Guodong Xu <guodong.xu@oss.qualcomm.com>
To: Junhui Liu <junhui.liu@pigmoral.tech>,
Yixun Lan <dlan@kernel.org>, Anup Patel <anup@brainfault.org>
Cc: Troy Mitchell <troy.mitchell@linux.spacemit.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] riscv: dts: spacemit: k3: Disable the ACLINT SSWI node
Date: Sun, 06 Dec 2026 00:47:44 -0500 [thread overview]
Message-ID: <dae3d6cf369264b2aff9defe3089cb0b.guodong.xu@oss.qualcomm.com> (raw)
In-Reply-To: <DNCX31CXPHLC.37WA7PGMYW1Q4@pigmoral.tech>
Hi Junhui,
On Sat, 05 Dec 2026 23:50:48 +0800, Junhui Liu wrote:
> On Fri Dec 4, 2026 at 5:26 PM CST, Guodong Xu wrote:
>> The K3 has two devices that can deliver IPIs for an S-mode kernel, the
>> IMSIC and the ACLINT SSWI [1], and the kernel uses one of them. The
>> IMSIC node comes first in the device tree, so the IMSIC registers first
>> and provides the IPIs.
>>
>> With the SSWI driver built in (CONFIG_ACLINT_SSWI=y), the SSWI probe
>> then fails on each boot. On a K3 Pico-ITX board:
>>
>> [ 0.000000] riscv-imsic: interrupt-controller@e0400000: providing IPIs using interrupt 1
>> [ 0.000000] irq_aclint_sswi: interrupt-controller@f181c000: register 8 CPUs
>> [ 0.000000] irq_aclint_sswi: unable to create muxed IPIs
>> [ 0.000000] OF: of_irq_init: Failed to init /soc/interrupt-controller@f181c000 ((____ptrval____)), parent (____ptrval____)
>
> The initialization failure above seems to be due to both drivers trying to
> register as the IPI provider. I don't think this justifies disabling SSWI.
> If the error messages need addressing, that should be handled on the
> driver side.
Thanks for the review, and for finding the firmware cause.
The error lines are only the symptom. The question is which device
Linux should use for IPIs on K3.
The IMSIC wins only because its node comes first in k3.dtsi: both
nodes have cpu0_intc as their first parent, and of_irq_init() then
takes them in tree order. With the two nodes swapped (same properties,
only the order changed), the SSWI registers first, the IMSIC fails to
initialize, and GPIO, I2C and the UART get no interrupt on my CoM260.
ACLINT SSWI was never ratified, and the IMSIC is the IPI device that
AIA defines, with IPI virtualization. On a SoC that has an IMSIC, I
think Linux should use it, and the DT should say so rather than leave
it to node order.
> [ ... ]
>
> I reproduced your issue with vendor firmware v4.0.6 (built on 2026-08-19).
>
> Looking at the vendor code, the ACLINT was also incorrectly described as a
> CLINT in the firmware's device tree. This caused OpenSBI to mark the SSWI
> register range as M-mode-only, preventing S-mode from accessing it.
>
> The vendor code removed this incorrect CLINT node on 2026-08-28. I tested
> vendor firmware v4.0.7 (built on 2026-09-07), and SSWI worked correctly.
>
> Could you please retest with vendor firmware v4.0.7 or later?
With v4.0.8 and irqchip.riscv_imsic_noipi the SSWI provides the IPIs
on my CoM260 and all 8 CPUs come up:
irq_aclint_sswi: providing IPIs using ACLINT SSWI
smp: Brought up 1 node, 8 CPUs
> [ ... ]
>
>> @@ -1495,6 +1495,7 @@ aclint_sswi: interrupt-controller@f181c000 {
>> <&cpu2_intc 1>, <&cpu3_intc 1>,
>> <&cpu4_intc 1>, <&cpu5_intc 1>,
>> <&cpu6_intc 1>, <&cpu7_intc 1>;
>> + status = "disabled";
>> };
>> };
>> };
>
> So, it seems this patch is not needed.
I still think it is needed, for the reason above. Relying on the order
in which the nodes appear in the DT is not a good design.
Anup, Yixun: what do you think?
Guodong
prev parent reply other threads:[~2026-12-06 5:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 9:26 Guodong Xu
2026-12-05 15:50 ` Junhui Liu
2026-12-06 5:47 ` Guodong Xu [this message]
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=dae3d6cf369264b2aff9defe3089cb0b.guodong.xu@oss.qualcomm.com \
--to=guodong.xu@oss.qualcomm.com \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=junhui.liu@pigmoral.tech \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.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®