* [PATCH 0/3] irqchip/aclint-sswi: XuanTie C9XX generic probe and csky compatible
@ 2026-11-29 3:25 GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant GUO Ren (XuanTie)
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: GUO Ren (XuanTie) @ 2026-11-29 3:25 UTC (permalink / raw)
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, linux-kernel, devicetree, linux-csky,
GUO Ren (XuanTie)
This series cleans up the XuanTie C9XX support in the aclint-sswi
driver and adds the csky,c900-aclint-sswi compatible.
Patch 1 drops the XuanTie C9XX specific probe: its sxstatus.CLINTEE
check is redundant because the firmware (OpenSBI/zsbl) always sets
CLINTEE before exposing the SSWI device in the device tree, so the
generic probe can be used like the other vendors.
Patches 2 and 3 add the csky,c900-aclint-sswi compatible to the
binding and the driver; thead,c900-aclint-sswi is deprecated.
Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
---
GUO Ren (XuanTie) (3):
irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant
dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible
irqchip/aclint-sswi: Add csky,c900-aclint-sswi support
.../thead,c900-aclint-sswi.yaml | 4 ++-
drivers/irqchip/irq-aclint-sswi.c | 32 ++--------------------
2 files changed, 5 insertions(+), 31 deletions(-)
---
base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
change-id: 20261129-sswi-643f81d4ea01
Best regards,
--
GUO Ren (XuanTie) <guoren@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant
2026-11-29 3:25 [PATCH 0/3] irqchip/aclint-sswi: XuanTie C9XX generic probe and csky compatible GUO Ren (XuanTie)
@ 2026-11-29 3:25 ` GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 2/3] dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 3/3] irqchip/aclint-sswi: Add csky,c900-aclint-sswi support GUO Ren (XuanTie)
2 siblings, 0 replies; 5+ messages in thread
From: GUO Ren (XuanTie) @ 2026-11-29 3:25 UTC (permalink / raw)
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, linux-kernel, devicetree, linux-csky,
GUO Ren (XuanTie)
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) <guoren@kernel.org>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible
2026-11-29 3:25 [PATCH 0/3] irqchip/aclint-sswi: XuanTie C9XX generic probe and csky compatible GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant GUO Ren (XuanTie)
@ 2026-11-29 3:25 ` GUO Ren (XuanTie)
2026-11-29 3:36 ` sashiko-bot
2026-11-29 3:25 ` [PATCH 3/3] irqchip/aclint-sswi: Add csky,c900-aclint-sswi support GUO Ren (XuanTie)
2 siblings, 1 reply; 5+ messages in thread
From: GUO Ren (XuanTie) @ 2026-11-29 3:25 UTC (permalink / raw)
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, linux-kernel, devicetree, linux-csky,
GUO Ren (XuanTie)
Add the "csky,c900-aclint-sswi" compatible for the XuanTie C9XX SSWI
device. The "thead,c900-aclint-sswi" compatible is deprecated.
Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
---
.../bindings/interrupt-controller/thead,c900-aclint-sswi.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml b/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
index 0b34ed5b4639..edaf3af49912 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
@@ -18,13 +18,15 @@ description:
Following variants of the SSWI ACLINT supported, using dedicated
compatible string
- - THEAD C900
+ - THEAD C900 (deprecated)
- MIPS P8700
+ - C-SKY C900
properties:
compatible:
oneOf:
- enum:
+ - csky,c900-aclint-sswi
- mips,p8700-aclint-sswi
- spacemit,k3-aclint-sswi
- items:
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] irqchip/aclint-sswi: Add csky,c900-aclint-sswi support
2026-11-29 3:25 [PATCH 0/3] irqchip/aclint-sswi: XuanTie C9XX generic probe and csky compatible GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 2/3] dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible GUO Ren (XuanTie)
@ 2026-11-29 3:25 ` GUO Ren (XuanTie)
2 siblings, 0 replies; 5+ messages in thread
From: GUO Ren (XuanTie) @ 2026-11-29 3:25 UTC (permalink / raw)
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, linux-kernel, devicetree, linux-csky,
GUO Ren (XuanTie)
Add a match entry for the "csky,c900-aclint-sswi" compatible of the
XuanTie C9XX SSWI device. It is identical to the device matched by
the deprecated "thead,c900-aclint-sswi" compatible, so use the
generic probe.
Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
---
drivers/irqchip/irq-aclint-sswi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint-sswi.c
index f48f042dccdf..9dc2b31f880c 100644
--- a/drivers/irqchip/irq-aclint-sswi.c
+++ b/drivers/irqchip/irq-aclint-sswi.c
@@ -181,3 +181,4 @@ IRQCHIP_DECLARE(mips_p8700_sswi, "mips,p8700-aclint-sswi", generic_aclint_sswi_e
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);
IRQCHIP_DECLARE(thead_aclint_sswi, "thead,c900-aclint-sswi", generic_aclint_sswi_early_probe);
+IRQCHIP_DECLARE(csky_aclint_sswi, "csky,c900-aclint-sswi", generic_aclint_sswi_early_probe);
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible
2026-11-29 3:25 ` [PATCH 2/3] dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible GUO Ren (XuanTie)
@ 2026-11-29 3:36 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-29 3:36 UTC (permalink / raw)
To: GUO Ren (XuanTie); +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: interrupt-controller: csky,c900-aclint-sswi
lacks SoC compatible
- [Low] dt-bindings: interrupt-controller: missing rationale for csky
prefix change
--
commit a2dfb82469c639b2df7e139b363104634c20abd7
Author: GUO Ren (XuanTie) <guoren@kernel.org>
> dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible
>
> Add the "csky,c900-aclint-sswi" compatible for the XuanTie C9XX SSWI
> device. The "thead,c900-aclint-sswi" compatible is deprecated.
>
> Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
[Severity: Low]
Could the commit message explain why thead,c900-aclint-sswi is being
deprecated in favor of the csky vendor prefix? All other XuanTie C900 and
C9XX RISC-V bindings in the tree (such as thead,c900-aclint-mswi,
thead,c900-aclint-mtimer, thead,c900-clint, and thead,c900-plic) use the
thead prefix, while csky has historically been used for 32-bit C-SKY
architecture IP blocks.
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml b/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
> index 0b34ed5b4639d..edaf3af499120 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
> +++ b/Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml
> @@ -18,13 +18,15 @@ description:
>
> Following variants of the SSWI ACLINT supported, using dedicated
> compatible string
> - - THEAD C900
> + - THEAD C900 (deprecated)
> - MIPS P8700
> + - C-SKY C900
>
> properties:
> compatible:
> oneOf:
> - enum:
> + - csky,c900-aclint-sswi
> - mips,p8700-aclint-sswi
> - spacemit,k3-aclint-sswi
> - items:
[Severity: Medium]
Should csky,c900-aclint-sswi be a fallback constant behind a SoC-specific
compatible rather than a standalone entry in enum?
XuanTie C900/C9XX is a licensable CPU IP family integrated into vendor
SoCs, and both this binding (for sophgo,sg2044-aclint-sswi with
thead,c900-aclint-sswi) and the sibling thead,c900-aclint-mswi and
thead,c900-aclint-mtimer bindings require a SoC-specific compatible ahead
of the generic C900 fallback:
Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml:
- items:
- enum:
- sophgo,sg2044-aclint-sswi
- const: thead,c900-aclint-sswi
Putting csky,c900-aclint-sswi in the single-item enum allows bare generic
compatible strings without a SoC-specific identifier and rejects nodes that
pair a SoC compatible such as sophgo,sg2044-aclint-sswi with
csky,c900-aclint-sswi.
In addition, thead,c900-aclint-sswi is only marked deprecated in the
description text; its schema entry lacks deprecated: true and the first
example still uses thead,c900-aclint-sswi.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261129-sswi-v1-0-003d9b8b9588@kernel.org?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-29 3:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 3:25 [PATCH 0/3] irqchip/aclint-sswi: XuanTie C9XX generic probe and csky compatible GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant GUO Ren (XuanTie)
2026-11-29 3:25 ` [PATCH 2/3] dt-bindings: interrupt-controller: Add csky,c900-aclint-sswi compatible GUO Ren (XuanTie)
2026-11-29 3:36 ` sashiko-bot
2026-11-29 3:25 ` [PATCH 3/3] irqchip/aclint-sswi: Add csky,c900-aclint-sswi support GUO Ren (XuanTie)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox