From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795922797; b=bfH/v3XR7lmlBOqosTRL8uE6b/xcxwWrKHTOksVrVCalbehUCf0AODPaL32iNDPww+vU rK9I28BkUmXrx39Uj3LwdAk9NfmBQ41B6hDR0Us/dSDbufvjLDjR/4vzB+JtsGLu3prpr 1+mGbjies3+4S3KKgrVJw4OwTtZ07zdqCMJT6SNCRIYHrXz0wFN4ezMMt1LOkTPqBJ7eP pxGJbeJu8gfXT2fH00E5goAW/zxVbbe9f+IK+9eJIb/XTe9DpGn2+gm3OJg+UOvFT3kWG JoJda7OiF/Na9I8izFS8KCS5xy5c4mkkUhFFNV0pyV5hWtAGuEweCrWiIl20jIlEf5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795922797; h=Received:DKIM-Signature:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer; bh=Fmx5gM7sQvIsaTAc9PomOsY4tzv/Gae+hQXZ6KQU/u0=; b=vHCETrqMzVC7Pr/QfhPHOQ0u15gjmbJy8/eqp/QCbum+xyuXOgXea0nT2Ty8ueO3TAc8 hDQoMPTAfe/n2Yd8PpLxUh+MLbgjnP0/C905zjV2qsC+odeZQxAdGhDgWcqtIKkWN/zbH tmp7fodDE4cLaoyIrX9lOWNtBHBvAg6be8JRemLrHxb6MVegH5PYTaKvKY7rvZQdOrsWb PlmCfOuU+nZvEB3hRE7M0w1x8MS3bNmGAahAr0AdJFstmqIdHh3kido1PGluY+87htJUu J7SuFM/rfiCWi28CQgmAKCzE3QcyPGco/RZM4xxei4QAwtMFxbXAJp8sRms7kPxsY2w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=b128zeb8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (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 25184606A31C; Sun, 29 Nov 2026 03:26:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=b128zeb8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC16D1F00897; Sun, 29 Nov 2026 03:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795922797; bh=Fmx5gM7sQvIsaTAc9PomOsY4tzv/Gae+hQXZ6KQU/u0=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=b128zeb8lOYvP8oQwulrR7t9LvaCpsHdDUd3tQ3Ovmx42t2tuTsYAFAYupXnvXByP RajU/i86ODhnQlCusD6kgJcZVFRPzakBhI4ipysXVMsyHBR1+80THDCB53Qcz9orFg L7N+nXaJyAxc3fU1uizzLgVNQwS6sJy3G/Atd6EUa0m32Q0c9K/lXe0/0pBna84qLA GRzbRgu3ZkzXzmrMH7wSfnomQPryf9hUb1rfuj31NiIeQ2KSRwTOv2psqbd90PUpL4 tkBNzdQhJzeKUd1jaIdCltHLBoAL/zy+NYjjQWtgyomWppI4FYgTWoMudHU1bcxqFt bNF2zJ9ZnRmkw== From: "GUO Ren (XuanTie)" Date: Sun, 29 Nov 2026 03:25:20 +0000 Subject: [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261129-sswi-v1-1-003d9b8b9588@kernel.org> References: <20261129-sswi-v1-0-003d9b8b9588@kernel.org> In-Reply-To: <20261129-sswi-v1-0-003d9b8b9588@kernel.org> To: Thomas Gleixner , Radu Rendec , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Inochi Amaoto , Inochi Amaoto , Samuel Holland , Vladimir Kondratiev , Chen Wang Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-csky@vger.kernel.org, "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 The XuanTie C9XX specific probe refuses to register the SSWI device unless the sxstatus.CLINTEE bit is set. The check was added because the XuanTie C9XX CLINT S-mode extension requires the M-mode firmware to set mxstatus.CLINTEE, otherwise writes to the SSWI registers do not generate supervisor software interrupts [1]. In practice, the firmware (OpenSBI/zsbl) always sets CLINTEE before exposing the SSWI device in the device tree, so the presence of a "thead,c900-aclint-sswi" node already implies that SSWI is usable and the kernel-side check is redundant. The MIPS P8700, Nuclei UX900 and SpacemiT K3 variants have no such vendor checks and use the generic probe directly. Drop the XuanTie C9XX specific probe and point "thead,c900-aclint-sswi" at generic_aclint_sswi_early_probe() to align with the other vendors. Link: https://lore.kernel.org/all/35d288d3-56dd-4018-8b98-78311c29a25d@sifive.com/ [1] Signed-off-by: GUO Ren (XuanTie) --- drivers/irqchip/irq-aclint-sswi.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint-sswi.c index 34572db94f3d..f48f042dccdf 100644 --- a/drivers/irqchip/irq-aclint-sswi.c +++ b/drivers/irqchip/irq-aclint-sswi.c @@ -180,33 +180,4 @@ static int __init generic_aclint_sswi_early_probe(struct device_node *node, IRQCHIP_DECLARE(mips_p8700_sswi, "mips,p8700-aclint-sswi", generic_aclint_sswi_early_probe); IRQCHIP_DECLARE(nuclei_ux900_sswi, "nuclei,ux900-aclint-sswi", generic_aclint_sswi_early_probe); IRQCHIP_DECLARE(spacemit_k3_sswi, "spacemit,k3-aclint-sswi", generic_aclint_sswi_early_probe); - -/* THEAD variant */ -#define THEAD_C9XX_CSR_SXSTATUS 0x5c0 -#define THEAD_C9XX_SXSTATUS_CLINTEE BIT(17) - -static int __init thead_aclint_sswi_probe(struct fwnode_handle *fwnode) -{ - int rc; - - /* If it is T-HEAD CPU, check whether SSWI is enabled */ - if (riscv_cached_mvendorid(0) == THEAD_VENDOR_ID && - !(csr_read(THEAD_C9XX_CSR_SXSTATUS) & THEAD_C9XX_SXSTATUS_CLINTEE)) - return -ENOTSUPP; - - rc = aclint_sswi_probe(fwnode); - if (rc) - return rc; - - /* Announce that SSWI is providing IPIs */ - pr_info("providing IPIs using THEAD ACLINT SSWI\n"); - - return 0; -} - -static int __init thead_aclint_sswi_early_probe(struct device_node *node, - struct device_node *parent) -{ - return thead_aclint_sswi_probe(&node->fwnode); -} -IRQCHIP_DECLARE(thead_aclint_sswi, "thead,c900-aclint-sswi", thead_aclint_sswi_early_probe); +IRQCHIP_DECLARE(thead_aclint_sswi, "thead,c900-aclint-sswi", generic_aclint_sswi_early_probe); -- 2.43.0