Re: [PATCH RFC] riscv: dts: spacemit: k3: Disable the ACLINT SSWI node

From: Guodong Xu

Date: Sun Dec 06 2026 - 00:48:02 EST


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