From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795925066; b=EJHJd0hSgz7c712KdoPdLC8LQfMBmMI9aM3m/uhk6oZod8pw++e9HYr2gAb9Ps3C4qZu S8DDiy2AZjmt2SVs3BiyLvyjUb2DZcJz6bbCM843PW34kyuuw0OO4kYpzY6XjMd9zuvN9 rgumIrf0nlbNRDBONhobsfc2zv68wkLbCxJIMutVQ3JAC626bnYHJe++J0m+aV2xl4lp9 Xg42hfUl6nxqAf1osurT4sYBPtahzglAvXGNDZC0N+HFqWnl2TXJZQcAp9YZY/OWGJSJI JB8CCIThwR/sEB7WqDAuTTr3k3wfjNiGB+E1kivPcENCpwcI4gvzYCQOPax2ZJJIHQg== 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=oyGKVT6Gy9ET0D6Ek1NHRXTuwlx956eKSk+1kpPdKUyjuNVYl/lYCvaInolXxU68GtRL 5Yh3rO6PH6xKbwCckTRYjWa+qt0fqeMQuX4QKcXo3LTWZGi1Wg7SrzODCpGjb/GeQYsle qMW3nZT1JdTnEkKq7KCsjyOr/eIip4BGSTaZg75R+17uyfjUz/bwIzZSygdy4Ouh7RJ4n FWcYfSXCePYpXCApmlc6kLk/vP7ZvOoCujl82rEguQ4h5GXpx3/InX0u42a7Xkg8lN2hM Qurb/vjtR8YQa0olttAyBO1gUMFTPG+VlOPzJ8zXZevpaOx67E9HZCpgYE/9mywzHKg== 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.210.179 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 6B419606A324 for ; Sun, 29 Nov 2026 04:04:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6B419606A324 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-pf1-f179.google.com with SMTP id d2e1a72fcca58-8a070781f63so4372448b3a.1 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=1pt+4gMPMgCVr83FJn9iRu/DU0fxSWq0tEwy7xQ/GY6RbDoKhavIRy7v45hknZxpJW hLr0TDN7IdDz6FW0aQ8cRl24qsEekt3myvov26PT19T+5+WBEi10sEvv6PY5LFcqFkF+ a1hRTxBJCCUB5AAD0k5H+aBnubaY2fabQoXyp653CZByEObrg9D5BlRh/pZWBD59lC2b Q5ffBCU1UVlTNP86GYI7ZMwCSD9ElgLHbWLFwBBDCURlNwz3XNZ1UBC6SM3SZPOFIGeN aApx0GeXuTc8LjB5+OWgK0NG8uweq+K+aWaiC3mRWxJ2K78ELvLivB07FHt59Nvaihqe yRsg== X-Forwarded-Encrypted: i=1; AL+hErHaQqrqVIh/QteaHNEns05nSbli36ymWH5KP9vLZQUWLNSa7B5E/Evh9LKtTLNPrr6FsfSutm2aiTBzAhw=@vger.kernel.org X-Gm-Message-State: APuU4Z9SkriG9PClcykZLHK35dFYAThkCrlBoILdxyp2XO2ORjJ29wK5 vqlyq0Q+mH1NmL7zz3pEvvVaypkDOO1C9zfgjEmtolS6KDcxWCfy508q X-Gm-Gg: AZFdTZeCGfKnCyUu9oRLJ3l56s9dgIf6s6j/nIb8A+n4TypGmfiESAtT+PjLjTkHeKA cUUV1m4P+d5fjnia6HGKNso2eYTH7wAE28hpVDpEqD2sstKC1xVaZEbb1hj1Yk1IjNBIgGtqitR TrH/HyPwdo59bqpyW/8d0Uz4i17Nr6cEstajWDINIneLBS1AClt1yVloRpDEmEixz2GfZVrLKSy z1kqmcuuD4dZztGB9Y8pRyV9DDHy/eNrTlE5gwfLYbAiIhsiOd/1gwb/2oMrgLHTMbWmHFS5asQ ByEQ4MRNyLYEsgX56QwzePvRSVS/CB3iRTcMQ5Ih/dyb7bHKf5nXfUyWPlJ215eRJhJXobqFe1B 8GfLls6/WObzDvwFpiPnbalr2fAAVH8lc0kQPyt0shQjTSYAF5C7XYb+19ezexZAUtj5TbuOxcI 9qrO03eE9HwsMlrmbbsf7IPdTf7cdUesCK7WrkeunnegiCVrvfkN6NdrfH7QDgIzYV7k3keETsQ bSRkupFWqE7SBEX/zBx5s8U4dZomXx4r4fCfOrpGBszZypwYF9lq6nI3i/KSu1oGT6WjgHG74zo mYsmRk0KcAr8AuwlR2E1cmzDqvwp 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-kernel@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