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=1795925067; b=jdj35bq7V+jsWrAUG/oZqp7kGt/Jgk+fQ1YC0IPPxcyVZz0QABM6qBJ5IMg3dWglVVlR vSSQ3AMmnwdoneqhWR/YcXZulz/B9SIsgGHicjTR6g4nF9urJ2597xzGNx7QW6nU6tQdG 5FXsCLJGM9WPWRliERCJ8By2jfN5y1r0RP2lVDQo6dys32NbyRmyt7XSLioS+wNSXacdC IZJSiwyjTNTDe79JMXNtxv8++pFrqXtzmf9gkU4JQbKMYr2MaX6rDnIEQnREbQsE5/Jwc oso2dQhmOkAkOfWfz9p1nAX5bfzEMgIwMXF9Z+ehPxGOk+ZY7klIY0qTnam3qmNq9Kw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795925067; 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=ORTWlVWkniP6173uNBoYkipYE9J44FgFgFyWuYXe1m+pTXyezTkB1YHhr6AZQGg4ct32 oT1SqXlT9wFZyzndndAjQoXpVX79Bh1XNkPkIIUZT6x5Dz6tvPCeo3x23w8urV8tA5YLP wJDdO0X9A0xDuwlvjrhOBVZPXnyfxABoZQpEy7hyaJu/TRI41IXHaQ45qrpLkQqkpMNWE dgjE/xuskz7ym5qk6YLFBxq/Y2rcL3YIM3nLY6Q+NVbWgwE8T2yjNvDyD/7TxQiwpe5a/ OzfHi4DxkSPAjtVTV1gIJTyVHSTmvnP2CN+wUQw6hyoB38txOnODj+iSNgehxOuggSg== 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 64ABB606A31C for ; Sun, 29 Nov 2026 04:04:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 64ABB606A31C 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-cdb75699c7cso3554402a12.2 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=xAvglVmLBFwz1qdv7/r1cvv+mPkwfvontYvPDk8ULe33OCq+kAYpuIzjHqJ9oYW9Ba 82511ovHZcIRqJrS44nJ9b7flp59LT3COtUFvQo6BnKMMdu/5viXRk3hb45g2zPdt/03 966M5CD15TTdqM7BwkhGMbHtd0cOxPvHAaAtf8ehS+wrq6c8MvNN4TL5thTRfd7sxknw 7x3URV9LJCb6BDpXLcZQPH/UzDcF275NKfmzgbKvrN9Oa6RixndM5W472rj+QTwWzJzT 1jD/5/Wz1EU7qD61cZxknLf2tFILz1KIwiWwE57ZqDoGtqxh2biKnqsgtWYzI/xikixG DHHw== X-Forwarded-Encrypted: i=1; AL+hErED3IZhj+sJ1pogoZUJrxFEDwqLJs8FLNwkprjAaYEUT/fV58jpuvEvEyOLb1rf/P63IIYOoxLq/TJH@vger.kernel.org X-Gm-Message-State: APuU4Z8adGDqdM1FYkK2sP1uYQIx8Y0oDZSEavssFT5UPXC983/lXyYE zQpUcsllh+KGt8OqdqCcIYU7WdjP9K1zisYUKlYM6/06gfBeA68+3qCy X-Gm-Gg: AZFdTZcP025KNk5YmlZtNhxqkiTO9TiES7n0gaxrjN06w1JwxwSYfUI31UPCzuG8/iU 5mGefEYjEJJ+WmjJdm71C+iHxAPQ92eTox/fpX3O2pC3VxjNfh9bydJaViGZjp8kTFvrb+WOxgG /DGgNYvLdQvYNiEgrp0HSbZJdMzrBLB2522oXFBu+DjlI38jv9fJw0TUCCYWxyVZDrM20hzN2gy cTOyjcLgVugnaZkvHM4ynR25LoGwBpZHuo51zxT0iOmO7eKsDOsIe2XJYj1RXZTnYWtXYqIYr6x L8/Wfo/ySTnOxiZRGabw7FdK5XK8siqBt/9xpCjG14qUG2pSuIe4edQEu/u3jPV3EOQtGwCQ0A9 RtbhHmBr0RyQMRQKH1GnqQGQMPHLrTRJeGSzQRhbzSqsYoAiB8vWMT/fJHIRorlZZSSgziODX3c FZknUnmrjNAA3gtTOVtQUdwcp2Lir7RQofeJgL39AZ+UF2YOyNIeNHF4P5rGhwtPDwiAqQRh2Y5 Ho1MS35CqepJFbSHw+zhuPawwS/5E+SqPbOf0hh31AzxJV3yi2FxUaNAceSchH9wbH/Z2ykUuI9 Qz1wJlasUKnjuWYoOa/zyDAGZTnR 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: linux-csky@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