From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.180.15 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796485897; b=UbAHOu5wR/KwslS/orjAnC/5HhcZuLcWeK/xyyUQBo89Xb3GA2/+W0d0QFL0x+LaxsV9 ZW3n4Sv+eM0R7qnopLGHuC3g4xYU1w6TPqFj1PsXIFJGUENkRVRhjCZut56I9tluerkQU isiJnS3kAgvj3ylxzqwbGzEDGZoBYYXC5NcGPgQf6vN2HPy4z1DMQ2D3TLqCwUXDlD3Ec f50ifxwOiGwHMhUo+Xs9bAx1k9UR4V5zj32NDwqZzFPwNOILPwoapGWbFSW4ama+iwXHZ xz32utcnOdUtx93t3Swn2TW21egMZzNIt9E8067SAyp9db+Zm5r3dHMsAxgRygV8Dwg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796485897; h=DMARC-Filter:DKIM-Signature:Received:Mime-Version: Content-Transfer-Encoding:Content-Type:Date:Message-Id:To:Cc:Subject: From:X-Mailer:References:In-Reply-To:X-ZohoMailClient; bh=EVl5xW5gJBHBKVNh7H2Qbeo76oB6HgsWqlCEKUHN2Kg=; b=sANoTrKNYcLJXU9pYSZhOB/gXGGm6p917B+F88z6GObw1O0qtalqvLrtmN+/q4cgUYo0 o9i2KCqarCwhvei6ZuKKD66oqf0p25DrDXvnJfFI1KAicZwH8+0gtTUcRrf9o43sdLAzx N6iPymPJEztrBhLpieeCjMaVLyu79OFE8kNJuDCnSfzJ0KHUx8OyXAbPkMeBVHxIiLYTN A3L3gia/bD4DamD0A33Da4zexvoiz62YeveEDwP97hmNXyT+0+O+yNvXlqQ+MuK3vUP8K SQCjrR4fsvZG6/dyAjNoCe9LgFO5Uj15nMIiRItNJN7AC3hGOMbsxCOE++T78WXrnlg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=pigmoral.tech; spf=pass smtp.mailfrom=pigmoral.tech; dkim=pass header.d=pigmoral.tech header.i=@pigmoral.tech header.a=rsa-sha256 header.s=zmail header.b=I4Sn5ZI1; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.180.15 Received: from sender6-op-o15.zoho.com (sender6-op-o15.zoho.com [165.173.180.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA173606A322; Sat, 5 Dec 2026 15:51:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA173606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pigmoral.tech Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pigmoral.tech Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pigmoral.tech header.i=@pigmoral.tech header.a=rsa-sha256 header.s=zmail header.b=I4Sn5ZI1 ARC-Seal: i=1; a=rsa-sha256; t=1796485860; cv=none; d=zohomail.com; s=zohoarc; b=f2rHpcG2wG+bftWglzy4qFPSgwiZvDE7HseM6BYuBBGQ7bmE/LR7v1SH3B7iuVjuyMS2Vly1Q/v9oiLqFOdjkOx1t5x0YwUrkmchzFN8K5m435g+iCcJWUhAhEA4ySXTgYyTNrtuVeueDAxfb7VHPnQSuP5sLQSUf/uMMHzejLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796485860; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=EVl5xW5gJBHBKVNh7H2Qbeo76oB6HgsWqlCEKUHN2Kg=; b=QBRLeWnauOK2v5v97t/ubOsqjV0Y3SOBdaYQ1cTDXN/HbBSL3WpDjMw8prk5ZCN7TtcvUHpHnhGtgglsPJLrnJzO8hbGNHJZ5sKeWdk38PSV+LNWTruXSayXPGjP7zjlr3Qv7goFeJJG0bvT5ASBE8Hr4vIC0k9Xd/92ap7ZQkA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=pigmoral.tech; spf=pass smtp.mailfrom=junhui.liu@pigmoral.tech; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=I4Sn5ZI1+Hek/h7Y8RXlXw7EjxlGUHxGq20fx8UOy1sWbMGcaD82gByau+/EOL7i1I69NWUm2WnvDkZMCm0mLDVIXghqANmzYWURpeWkpFguNfrKBuFwu704x3qiyATY+Hw4bKGy1AARazSHIcefaolOMOUU3WYS9/bu1t6kAoY=; c=relaxed/relaxed; s=zmail; d=pigmoral.tech; v=1; bh=EVl5xW5gJBHBKVNh7H2Qbeo76oB6HgsWqlCEKUHN2Kg=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796485856162928.5267917477655; Sat, 5 Dec 2026 07:50:56 -0800 (PST) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 05 Dec 2026 23:50:48 +0800 Message-Id: To: "Guodong Xu" , "Yixun Lan" , "Junhui Liu" Cc: "Troy Mitchell" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , "Anup Patel" , , , , , "Guodong Xu" Subject: Re: [PATCH RFC] riscv: dts: spacemit: k3: Disable the ACLINT SSWI node From: "Junhui Liu" X-Mailer: aerc 0.22.0 References: <20261204-k3-dts-sswi-disable-v1-1-a852d915128f@oss.qualcomm.com> In-Reply-To: <20261204-k3-dts-sswi-disable-v1-1-a852d915128f@oss.qualcomm.com> X-ZohoMailClient: External Hi Guodong, Thanks for your report. 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=3Dy), 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. > > With irqchip.riscv_imsic_noipi [2] the IMSIC does not register for IPIs > and the SSWI takes over. On a K3 CoM260 board with the vendor firmware > that boot stops with a store access fault at the first IPI: the > firmware does not let S-mode write the SSWI registers. > > [ 0.000000] Kernel command line: console=3DttyS0,115200 earlycon clk_i= gnore_unused irqchip.riscv_imsic_noipi boot_mode=3Dnor > [ 0.000000] irq_aclint_sswi: interrupt-controller@f181c000: register 8= CPUs > [ 0.000000] irq_aclint_sswi: providing IPIs using ACLINT SSWI > [ 0.089686] smp: Bringing up secondary CPUs ... > [ 0.094223] Oops - store (or AMO) access fault [#1] > [ 0.094233] Hardware name: SpacemiT K3 CoM260 IFX (DT) > [ 0.094235] epc : aclint_sswi_ipi_send+0x2c/0x52 > [ 0.094243] ra : ipi_mux_send_mask+0xa0/0xc0 > [ 0.094267] status: 0000000200000100 badaddr: ffffffc600040000 cause: = 0000000000000007 > [ 0.094270] [] aclint_sswi_ipi_send+0x2c/0x52 > [ 0.094274] [] ipi_mux_send_mask+0xa0/0xc0 > [ 0.094278] [] __ipi_send_mask+0x1e/0xe0 > [ 0.094281] [] arch_irq_work_raise+0x32/0x3a > [ 0.094346] Kernel panic - not syncing: Fatal exception in interrupt 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? > > Disable the node, so that the kernel does not probe the SSWI on K3. > > Link: https://lore.kernel.org/r/20260918-k3-aclint-v3-6-cf4fd4050e14@pigm= oral.tech [1] > Link: https://lore.kernel.org/r/20250716123745.557585-1-apatel@ventanamic= ro.com [2] > Signed-off-by: Guodong Xu > --- > This is an RFC because it takes back part of commit cc6371a7f519 > ("riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT > nodes"), which made the SSWI node available to the kernel. > > Junhui, Yixun: is the SSWI meant to be used by Linux on K3? If not, > this patch is enough. > > About the firmware: the cover of the series that added the node says > that OpenSBI leaves the SSWI range available to S-mode [3]. On my > CoM260, with the vendor firmware, the write faults; the panic and the > kernel command line are in the commit message above. The kernel prints > this about the firmware: > > [ 0.000000] SBI specification v2.0 detected > [ 0.000000] SBI implementation ID=3D0x1 Version=3D0x10006 > > Which firmware was [3] tested with? > > Background: the RISC-V defconfig does not build the SSWI driver at the > moment. Its entry is still CONFIG_THEAD_C900_ACLINT_SSWI=3Dy, the option > name from before v6.17; the option is now called ACLINT_SSWI [4]. I am > preparing the patch that changes the entry to CONFIG_ACLINT_SSWI=3Dy, and > these messages showed up when I tested it on K3. > > I used status =3D "disabled". mimsic and maplic in the same file use > "reserved"; tell me if that fits better here. > > [3] https://lore.kernel.org/r/20260918-k3-aclint-v3-0-cf4fd4050e14@pigmor= al.tech > [4] https://lore.kernel.org/r/20261129-riscv-defconfig-cleanup-v1-0-a1499= 084d8bc@oss.qualcomm.com > --- > arch/riscv/boot/dts/spacemit/k3.dtsi | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/s= pacemit/k3.dtsi > index e89d2cc5ca8cc..79003d977b995 100644 > --- a/arch/riscv/boot/dts/spacemit/k3.dtsi > +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi > @@ -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 =3D "disabled"; > }; > }; > }; So, it seems this patch is not needed. > > --- > base-commit: 9606889b9da76bfb92eb711088e0b26902b72bdf > change-id: 20261204-k3-dts-sswi-disable-ee9df877e306 > > Best regards, > -- =20 > Guodong Xu --=20 Best regards, Junhui Liu