From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795925066; b=v8zT1ftHqqkEHMLjYsq8MRgLNr8M7afnaEDhdaMNRPNKzO0gsrLr7LJht+gnhD6PqbaO O7lxqmiRnCfkIDwbUkLiKbWHZR46tWJMKv3+UFp3r/vWXI2U8lkSaLKSkRJBTohF5jPRM ZfzoA/R+dSYWmLcNapy23y50OMz9UvOzWEyQksoHJKNJrZGAXPwlEJwvhCoS/0DAZAd0n 0WBrnRf2P8gqiTfj+kMEvRcrvA3nJM9VAgaxhtase4pF0VPbdHY7BasS5EngKAu/asQ6T zaGbcBteTNIsPR2MJe1+Rbn6DcZ5wOKXPsMBeBIXeZxtN2NqaCZXm9jHZ/BxPJ6OD3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795925066; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=U43w0+76b530NQIDiftbjh43Ep/0ZAgrDZY+TH3bl/Q=; b=xEt097enXPkQxLqpL6McsRo83i2oQmPCCU3HBtUjQY4H0yi001o1Sr1XNPrVnySwPneZ EDNaEVkW6TBYkdakly/o4T/i59uS0G5RKdgYNcPBm4zjkREQLFCG+LoHzknMwrdRznmfN 3P9ZiytqtTn09Ny8aF2nXt6cr2MPIuPJW6doFX9rO3M4kQ1iYRMXIY0oeVkiMEH9RCvu3 8xD3TqlJyddcd/cxoUubG+MAqL+T1axj5vy2vWAoMDCVKqLypCl/LyP/hQKku3kKSVMTE jWNvU64/5gRzOvGvhzWe+bKUs6M2PmdpCCBA/MtaI86KrZYkeu7EvAa4+jd8yURNMlA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=L0j7bWYD; arc=none smtp.remote-ip=209.85.215.173 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64BB4606A323 for ; Sun, 29 Nov 2026 04:04:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 64BB4606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=L0j7bWYD Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-cc4be0e5351so5795483a12.0 for ; Sat, 28 Nov 2026 20:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795925066; x=1796529866; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=U43w0+76b530NQIDiftbjh43Ep/0ZAgrDZY+TH3bl/Q=; b=L0j7bWYDHWaWG5SzN++ID72k8S3gN84gc4rAnBBtdwejTihxpQvrw0v2K/mMjtxRNY dhoNaCMXjt+Bv5R/OEeNaQdV3WYwv+mFoiDk8OcljYrf60bAj+lPaQVlprLe7OC/eOPu 7VQbDPS7vJLhylhBtGsoLSIB0gMoQEDxvigjSWJRsax/TC2ouVeXmH4iGJjZTRLbYo0m y5HWvOIdUm86rw+O4mLiB1xACAHVJOz+EeXVqgRAup2eo5DKtUM485pOIS27ozyklzWq m2jqIy+Nbeml4la48GXU9WqEl4wfHLT4UlyRROYM5hV4eB1YPlG97Tf7a51ifCF/aH0S ggRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795925066; x=1796529866; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=U43w0+76b530NQIDiftbjh43Ep/0ZAgrDZY+TH3bl/Q=; b=lV2oH8LyhLZNl+SvF84l9WoUJqzlQbXY72huMJ0ZCvTN48IgTxY3bspg1uPBD7fu09 tHrMmoJ3d01MPg2GHSk0p1/tkQdy9gO5pc6JyiMt2auguwxVwcFKsArppcPHZuDcmi/4 xYefXvHNmtPawAAUcy9ft6uTGKr88uQ87+aTLbLYz8pVRAzUr2l5g9NdbwHfhskLs27i c1HMswJHT9AUtQX4h/lHrNq0LiXyapccLizlAWP7RXDIySiGH/rNS5oaWXf0xF+A5XOA quY38jPIiC6KixXF4oEtmJOq284yV+5yoFFfO/tELsaLgm5cwvR4Xs4AoAy03E+jCTOo 2SeQ== X-Forwarded-Encrypted: i=1; AL+hErEV1HNcF5ySNUxDqtEpfc1PXWTGSiSgBUVvqMtLbCLLI/TN9WPNXBsu+J6W36gVJOx3mO/vNrfdOGWo@vger.kernel.org X-Gm-Message-State: APuU4Z+L+zdEz3aGP3Zo75kn0Wq1zZyYqHW1tsXC3aQ9oVPmKYqTRRzS EJejTZxCauHnVHyT3kvMcCRlOGwIfq72LD7MHH2cZ9YJczYZmHYROxZMk28v4bqt X-Gm-Gg: AZFdTZc1Y0lKsNE2OydBJv0vVNUTrvQwYaRi0vT3obTcyGjZYBOi3alq2IJndLwmFo/ iipLcAV5ReAfcn571BUKA7h5Vj4BVQiFkEg7nRUhaAbjqHW6mC6VCyLajCQ3dgJFAGkzGhDJGiH y9qPN2m/R5PKwY+fEtUbl5aWcZzLCbNZ2QL1/HZVrg+Ujb2IcVfWlU0Ps2uP/gHT4sBYpMmUQ+k ctx8wi6++kzYE3PQ8IF/De46IC9NJnP2iA6Umje2d7HJPdlw1TDGlw/MPHads+qQA0+ltbQAEN+ 9FgmBG7khmZk+EE9FwneeD0gw8D4fbg/SJ9wB1ngWH/CxHEFaS4rrxuqTjTqetW63c2prnKSXRE cl1zyxlrso7vRvUCKIbnPR0U2TROVtxKkNWi1Nrf7wiD2ryjx41UKuZt3UFkIrU8mV9meDsKszt JhFY5oBqR8jfjBoz0A9XCI0cfri2rzZ0Z44moFwC/LjWli8lG3vXp7a+LPQLE+I8zhrx2N9suKJ SgwTVrVB9RN802soAcvgnsgXvNA8je2ggUBEgQu2SQLpm+jHucHMTTIl3mkOXJvFtv0dNpg1I+r dPZrZlUsRFt90A+ucLWTDfmJeC6i X-Received: by 2002:a17:90b:3f0e:b0:3b3:fc1f:a5c1 with SMTP id 98e67ed59e1d1-3b41c8fed40mr29491398a91.28.1795925065832; Sat, 28 Nov 2026 20:04:25 -0800 (PST) Received: from localhost ([2001:19f0:8000:4ce8:5400:7ff:fe0e:e6b2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b405d97356sm47738846a91.13.2026.11.28.20.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 20:04:25 -0800 (PST) Date: Sun, 29 Nov 2026 12:04:13 +0800 From: Inochi Amaoto To: "GUO Ren (XuanTie)" , 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 Subject: Re: [PATCH 1/3] irqchip/aclint-sswi: Use generic probe for the XuanTie C9XX variant Message-ID: References: <20261129-sswi-v1-0-003d9b8b9588@kernel.org> <20261129-sswi-v1-1-003d9b8b9588@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20261129-sswi-v1-1-003d9b8b9588@kernel.org> On Sun, Nov 29, 2026 at 03:25:20AM +0000, GUO Ren (XuanTie) wrote: > 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 > Thanks, LGTM. Reviewed-by: Inochi Amaoto