From patchwork Wed Dec 20 15:57:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13500317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 263DCC46CD3 for ; Wed, 20 Dec 2023 15:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+2TB3KaVMBNvhWFxwTPVfRtpAIVaxtX8pfXgw7jnaeg=; b=n7IOx9CkVeZpfx Wo6wrb9MDmiZ1S4Bgl62nQQG8K/QNEiqX3qLNQOighsKOyNbfIf6bG0GEK5/zVCaNusZWLGvook+q fvmtkkEv/LWp9Ty7oSKIO5tAOzZiEJ7LP5oMeUXV/Xq4o7Exlo+9BTQr3F5rG4rdrfFnAvADg0f6Z szVf56tfUCvdkO0MppVokncm/xTDPjqHxw0VkhYv8qOHOfe5heCeu56tO9Y7HyBP+r06CLYqJadUx 0FR79s4AZMtuyT/9uvi7/KGxI4Sv6lX5Oe/rN9sh9/7HCXryfkuH8t0OUQrtWoUPUamzOcvw27Bno Vm8ab403y/q0ABw7nNRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFyx9-000KKY-0C; Wed, 20 Dec 2023 15:57:47 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFyx6-000KIr-0R for linux-riscv@lists.infradead.org; Wed, 20 Dec 2023 15:57:45 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40c192f488cso10756945e9.1 for ; Wed, 20 Dec 2023 07:57:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1703087861; x=1703692661; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EdmTrlQiysEJ9gRiozTT9JeMo8PxECkQ3IPcbyVimLw=; b=SzU6F39f7KLJSh6+PMiQ0RyiPm2+9YdEqDYK0Xjvva2+B7NbQSlNnOMwQZXQIZuaQc SiakGNjMtqgE/Pn9QzVkoolQomd4KQO0ybS7sOI7CRyuFyA3eT3fUZuiqU3zTDirb4Sn lCn40X76lbcvneVjC2/YjhUJzgBD66dxwOf2AyBVseR+bBrD31Lmko34R6x2ggV13wbk ml0I7XIAfH59lpm+T7yKj+A32RfffGQFtg3vTh4OzX++pXSSr9JYYU1SH2Exgnnwq8Ie 6IAnh0fZAySytimADERh9ghTLy9h8WCrN2fTXHytohcwhbdlN7NNUc7wmYOIt6VPY6HH OZfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703087861; x=1703692661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EdmTrlQiysEJ9gRiozTT9JeMo8PxECkQ3IPcbyVimLw=; b=WajYwGzNjsWPeiZQ+zCdjYUCmRtrDUnzSiLruxD1p8q+5ytfvCBhJmOsPA60eRksnc Oegr1+YBboZKS4NcobYfDHojKQ/H2yQSORe/j6mR0L50SgX9QL/vyJq16vNFfmuO0XIc 5Epb/0cyh09qR/QY/YfL3+eRHql5UGU7hGX5mdjh+2Ws0G1sGcwQQKJ6rXU3BAPTv/Yw 0n/3V0Ze7mD4zgnlHSX4DKorcpWnzFHdTzbiK9cq3IZttfT+aAvmxuP5XHHtcJ/JLOlw AFFrfLCgmzJHGBshW6cOwoGzAdUP6ByWNlm1mlvItMQjm3aFldWcaoB44D82GwlwrJTs p16g== X-Gm-Message-State: AOJu0Ywis53UkO+y1akwDhRRJbNfoHoNf0dEZXRxDW1mgU/CHJACaZOj o/msNypRs7osinBa4C2A+jGIqRLyqN9hrVxcUkrI2g== X-Google-Smtp-Source: AGHT+IGomYXGZKW9fTAlUtiRU6C8bTb/3tOYsfSXVcqSVYVqyFBHuEtMtuZ51G/bO3fbDc3LJu//dA== X-Received: by 2002:a05:600c:81b:b0:40d:2cb9:42f6 with SMTP id k27-20020a05600c081b00b0040d2cb942f6mr3120863wmp.2.1703087861074; Wed, 20 Dec 2023 07:57:41 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:3eae:b70:f27f:7aa1]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003366af9d611sm7279693wrs.22.2023.12.20.07.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:57:40 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn , Gianluca Guida Subject: [PATCH v2 1/6] riscv: add ISA extension parsing for Ztso Date: Wed, 20 Dec 2023 16:57:17 +0100 Message-ID: <20231220155723.684081-2-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231220155723.684081-1-cleger@rivosinc.com> References: <20231220155723.684081-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_075744_391791_07AEDD06 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add support to parse the Ztso string in the riscv,isa string. The bindings already supports it but not the ISA parsing code. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 2438d4685da6..3b31efe2f716 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -84,6 +84,7 @@ #define RISCV_ISA_EXT_ZVFH 69 #define RISCV_ISA_EXT_ZVFHMIN 70 #define RISCV_ISA_EXT_ZFA 71 +#define RISCV_ISA_EXT_ZTSO 72 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index dc0ab3e97cd2..3eb48a0eecb3 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -279,6 +279,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zkt, RISCV_ISA_EXT_ZKT), __RISCV_ISA_EXT_DATA(zksed, RISCV_ISA_EXT_ZKSED), __RISCV_ISA_EXT_DATA(zksh, RISCV_ISA_EXT_ZKSH), + __RISCV_ISA_EXT_DATA(ztso, RISCV_ISA_EXT_ZTSO), __RISCV_ISA_EXT_SUPERSET(zvbb, RISCV_ISA_EXT_ZVBB, riscv_zvbb_exts), __RISCV_ISA_EXT_DATA(zvbc, RISCV_ISA_EXT_ZVBC), __RISCV_ISA_EXT_DATA(zvfh, RISCV_ISA_EXT_ZVFH), From patchwork Wed Dec 20 15:57:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13500312 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 122BEC46CD2 for ; Wed, 20 Dec 2023 15:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NE1+WzsS1S30f205vmgax4nIUABj+hiQO8yCneWEllo=; b=bJEp2ifRxW3vcp UWjCXFyXCjSpfvkEgH+pAEstRIsGGLjg1ltIkSX4FfJZywVqg6MKbn7TyQvuSVgztwX9XukIjEm63 LdntI0s0Ob81/oaNs/axBWcn3Uca0zqtmCA2N3WNU6g/a2YpMF9j4st2Gro1AG7Rq14S/MaqWATDd cRoSt37VbXHyCLb1CPHBkLr9HXrtnGJH+JLa7iOcBVkjGWPtLbPDHZdRsSYlQySwVnSPTNwISVmOj /eHp6TKpz04WncrBpln3G1CUDYH1SVeGfkpSvPDgOm9/MG+R4EmIsIDGAgA/Hkf/8Cesg3JcRArZ+ NEgjJX9oWOPiABxjaJGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxB-000KLj-2u; Wed, 20 Dec 2023 15:57:49 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFyx8-000KIt-0j for linux-riscv@lists.infradead.org; Wed, 20 Dec 2023 15:57:47 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40c317ba572so13868495e9.0 for ; Wed, 20 Dec 2023 07:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1703087862; x=1703692662; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fxiI83AWHviDA1K2goPpANE3T3h3Nt6zkBhZOZxUOr0=; b=cm1DvnYAaTkwxAvfHRkJh1ODBZZxXQM0qqJiGNBEo/bZmD/lt/u+h7494VDIaBgMxM oXqDSL6GJQg6wf/STiRlMZcNroMHis38zciUiwuv8xfGapQNahcJSjoerBG6Q3te0CJq j5gwq0PKkWzl4NhOPntVvKihh1+mpvXF6OR3e28T+ti9ozxkuX2A7MAY7pI7hW4o7UZE oyDyVqQAY6XYeyd7UtuEXqVs+kZ3vxFHfSQVUSQa7UJ7Tpo0/U4O+I7ATY0Vb6GzPEWl 3NbFIrNJMRq9CRfd/I/LynECtkYxFLZT2TGlydqQyyVZv3W19uZ9QAFLrTf8/lztcWzk sRIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703087862; x=1703692662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fxiI83AWHviDA1K2goPpANE3T3h3Nt6zkBhZOZxUOr0=; b=DTMnMlqDIVogpLHSKG+eRBOdaYCm/BObikzW63UPvUo1BSMZFSSHJxtZNyJv+/6m0r 0HBlPaXeeUF46fS87JOsD8Hot0JPzADBzyjU386lGrS8u934/gR7QKgc5FLysE8CJ5ZW THAu+0jjoXcny5jOdjKhPPKU1AmCVSXluG/5OpllBsFXwo3Eh4tK2oaRmXM6qi55dUwS OFDGSZEUCbOEp82kIiLic+JSsI+92CKpJBYSBFGJpgCGSx1bbwdy7cjdM3zQ8+SCsYqf DDBA2zY85UkQC/op//oMshliDZrf2oIvTQXfcw8zUK37ZQVktT7UWzVkvWiclEys4bXu AHSw== X-Gm-Message-State: AOJu0YwJM7RmeAqMcPBBj7YvRqK00qr1MfnCtorluHZE/1/UNampRMc4 qrzeN0ADFCiaxEd9qd8dAT+6PA== X-Google-Smtp-Source: AGHT+IFJbjR0PbYZ8f2Ct75zHWOpr+wt21lqG0IGhwGx4TEjDmQ++1Z336t5tRomVVKE9Pyr/5CpGA== X-Received: by 2002:a05:600c:214c:b0:40d:35c9:7b86 with SMTP id v12-20020a05600c214c00b0040d35c97b86mr1498909wml.4.1703087861906; Wed, 20 Dec 2023 07:57:41 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:3eae:b70:f27f:7aa1]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003366af9d611sm7279693wrs.22.2023.12.20.07.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:57:41 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn , Gianluca Guida Subject: [PATCH v2 2/6] riscv: hwprobe: export Ztso ISA extension Date: Wed, 20 Dec 2023 16:57:18 +0100 Message-ID: <20231220155723.684081-3-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231220155723.684081-1-cleger@rivosinc.com> References: <20231220155723.684081-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_075746_267830_0494D50A X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Export the Ztso extension to userspace. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 ++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 41463b932268..10bd7b170118 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -161,6 +161,10 @@ The following keys are defined: defined in the RISC-V ISA manual starting from commit 056b6ff467c7 ("Zfa is ratified"). + * :c:macro:`RISCV_HWPROBE_EXT_ZTSO`: The Ztso extension is supported as + defined in the RISC-V ISA manual starting from commit 5618fb5a216b + ("Ztso is now ratified.") + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index 91fbe1a7f2e2..01ac3dc196e5 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -56,6 +56,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) #define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) +#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c index f0bd7b480b7f..6564fa9e7a7f 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -174,6 +174,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZKSH); EXT_KEY(ZKT); EXT_KEY(ZIHINTNTL); + EXT_KEY(ZTSO); if (has_vector()) { EXT_KEY(ZVBB); From patchwork Wed Dec 20 15:57:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13500311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F2F7C3DA6E for ; Wed, 20 Dec 2023 15:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ViCYFX3GIMJS68wet1iHcKWnbdQ0v4ah4uCpitUZ4js=; b=xUXhwKFQfN7x5r GTjxKFmY43y1YCCQ6O2qpPRJGRQ6LI525Y1L/bW+wJUVXQhZhhkDlC/EIsWp7M1Qeif/n7IbotN5M PJMRP56f/oykhwX42WNg6i5jBOT3epuHzrtF+ZoVf2IqalGarwIaCXo3QkL/j0fY7rwAVyFu8Avk2 Zq/WnW334ZVjZjrFlHE6DAJtjhzGq4ql0UKIR5IS5EPqpMvMrT99txu60EszrZ0bJ1fk4MKgnmq8s aeaT+C4V8TusKVzPF13TvqLqIRJVipyY4B7f67aPsbMDzJMqaqU7O/k4sv6E0W8eXnW7R9wvhR5xg zCRjyWK209vF8G4r8mPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxB-000KL8-0p; Wed, 20 Dec 2023 15:57:49 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFyx8-000KJP-0U for linux-riscv@lists.infradead.org; Wed, 20 Dec 2023 15:57:47 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50e3803643cso880005e87.1 for ; Wed, 20 Dec 2023 07:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1703087863; x=1703692663; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=szFuFOaVPRcoa/3KGK9k9VHnKNMXDyjWXMloTHpkWuA=; b=h3lGsOtpexre2/3wOk6+1GgVKM0OHAeIksVmusjjuhwlBDh7vDQHFVbF8jW0oEKJ/V ZRWDiAPexAKaS8qQqvP6FSuYuiVMaHZowjIiah/3lKvZ5BwXkzbWpA9LEMMaMf1Ea/CB H7yRCZz/VZDIFpCzWm1VsCsqwVn+YwjXnN4ATuIX+mPR+uuDR9YuTc0qY49RxayT/MsJ F0lPr4WfWvXG/WxYKVMajV5MjB2jkn7WZXN8GyoDURLK8y6FewG04r7cSUTyrbpx7/H+ BrCqKGonp9VPJdbv37IC9YBM2o5gawGZK+UgAadeiXwwZvnFTdrBXXx/aan3aUXMvpIv jHkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703087863; x=1703692663; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=szFuFOaVPRcoa/3KGK9k9VHnKNMXDyjWXMloTHpkWuA=; b=rQIHo+aSrSKriDRhrI67eVc0Zrhhst8jLq96qHaJ1TlRqwtYlGkQpfT6Jn2eYZ+sms +SE1Eco40NHdXutilFOGkeCVkXbyp8C9XRYJ/xlxro229aCA8Gll2TEr3gOyjWc2LX/c dcyR+us22e/hnteLXyOprIiOMS46Xwdxapm7Qzt0rQWiCFB77UWv8Y8e87Cxy1cq+JFR wGzgwWpaqI5unhR4Mt/epqL3bC1E6fCZ2Bb83yN6co6PmUJ+BqbZZAp7GiT7Bp1+s/au RbXzH5x1VSTp8fzunkPzxyvYH3EYDPTYLsR+ThuOXUQZKcXh/Q86FH0n0RLy1+LSZ8kt r7zw== X-Gm-Message-State: AOJu0YxMrSEuy1y9VIPoOwSZjBnWVfVm7OUG50Df53SruHmDlsTMFVNI ssoU/ffJ2sXcSJ2rA1mSbI31jQ== X-Google-Smtp-Source: AGHT+IEMopGLd13u7V/5vIZqrC6QZYkg9U757Xi60NRR7tKxLQz11Pc5U0+SfTyL2OoD9i8imBIJRw== X-Received: by 2002:a05:6512:1592:b0:50e:4ec1:7d2e with SMTP id bp18-20020a056512159200b0050e4ec17d2emr2327025lfb.2.1703087863205; Wed, 20 Dec 2023 07:57:43 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:3eae:b70:f27f:7aa1]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003366af9d611sm7279693wrs.22.2023.12.20.07.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:57:42 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn , Gianluca Guida , Conor Dooley Subject: [PATCH v2 3/6] dt-bindings: riscv: add Zacas ISA extension description Date: Wed, 20 Dec 2023 16:57:19 +0100 Message-ID: <20231220155723.684081-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231220155723.684081-1-cleger@rivosinc.com> References: <20231220155723.684081-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_075746_186824_DA092E39 X-CRM114-Status: UNSURE ( 8.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add description for the Zacas ISA extension which was ratified recently. Signed-off-by: Clément Léger Acked-by: Conor Dooley --- Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 3574a0b70be4..27beedb98198 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -171,6 +171,12 @@ properties: memory types as ratified in the 20191213 version of the privileged ISA specification. + - const: zacas + description: | + The Zacas extension for Atomic Compare-and-Swap (CAS) instructions + is supported as ratified at commit 5059e0ca641c ("update to + ratified") of the riscv-zacas. + - const: zba description: | The standard Zba bit-manipulation extension for address generation From patchwork Wed Dec 20 15:57:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13500314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 815F3C3DA6E for ; Wed, 20 Dec 2023 15:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ej/vxGemdIcymuN3XgyZ2zcz/iyazJDhq8DFHqxf/oQ=; b=izdviiBPbKP6QG 4nd0w/kSpFvDt6/OWIttzqPGeIwvL004yo+mRhN/zLvG59Tlx/ndDKIWVTrSKjq+R4rWXl+6G/NuS Qb5UjnKYFbfoAbKVWPoPRisWLD9ICT9hvin1mECE+EjRqsE/9B803W3V34gzOcRPx6sew6gbghecQ Ck8iCd6Jt9zfYrXWBwzT6/Z+EIl3sUY1jx3nJzTLkRbNZj25cNMC9HSJqfp6EEGYiBfNuNwbmyJ4v 988+NRmNv1qYGDF0ieuWZQgyVsOIBrGlypFMi68d1Nk16s9RKnw/JslNcWHS661agxgXEMwo9NGMG A3p/dstnKj6l5Au21fFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxH-000KP0-28; Wed, 20 Dec 2023 15:57:55 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxA-000KJf-0X for linux-riscv@lists.infradead.org; Wed, 20 Dec 2023 15:57:49 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3364bfc850fso315484f8f.1 for ; Wed, 20 Dec 2023 07:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1703087864; x=1703692664; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oZT3AkmSaqumQ97ecuZBaz7B+rLb1J+xdw7pERlw1ck=; b=W8t1Ns/BEQt6wxxRPVmmGvMNsecCtoRp6YrSNhHGqhFHp9OYl/CxJyNu1KnCIkiWDt pf5Bxig4wB1IP/biBfwqGAN9CMDHN/z9Vm2jdERoMSXLCgTVXI3g5dIuVjhpedTIYkAa 2YyJz/R+VxTrDGQSX9oRgmgVymkxSMGmsGKTWl+E0JaZ0aPV3gwk457isYSUHiS5dGUw Sa2Ou9Sq4HZ9Q3KQa7zu501Wp2V24HaaJ+La2Gt/C58XpQ3ceyWVoj7TByp+O7PImCkZ JXw4iFtKgIrEDfPzNXdgUwpuOLVtuoUiJ40+Ffr4S/1b1tDsMKsq64H724XDR+ond+Dw 5aHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703087864; x=1703692664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oZT3AkmSaqumQ97ecuZBaz7B+rLb1J+xdw7pERlw1ck=; b=qp1a3ncJsvl7FE5Oj/wqrwtTfGFT8y5Lfn8y12/YTAYWGz780kvF8PgYN7DZfuIlZo NCDr0i9UZs7JnCc7iAO6OFualL+v+HYKoDI1ZRuLxKqcEo/72uQq6oKEmx6G5mYO8nTP rU1px6BHCGYQRTVLmx2iZAjY5vAD/ngfUF/ahnbadtjbJ25Qq2HppK1Pd768uwa+oKZ6 cn1BtRwYwYg66Z0PMecrbLjBsLd2t6S7TjaH6N+PsvifkNmkcgxbkvN0bqUSCjAt66Vf LrNjY1wo8Y1MPbgeGcvj7k8ZjIQXLEJkPulHG+cqvIqTpL2TRYwsT27ofO7i9Yf2jUkL 1SBA== X-Gm-Message-State: AOJu0YxRb8WB0CGEpH3+/U+LXGFR/gUmgZcTak+NnbgwhBBBCYGFOLQr SBNp+a0ifLQECkTRSSLRgF56VQ== X-Google-Smtp-Source: AGHT+IEAqrHN3Za66t0NZjui8EhChki4mQcTMIh6RZgm58ClLt3lfkny0M8iVRzoKzGcB9ZORNH4uw== X-Received: by 2002:a05:6000:18c9:b0:336:5c96:a3c7 with SMTP id w9-20020a05600018c900b003365c96a3c7mr7715482wrq.0.1703087864600; Wed, 20 Dec 2023 07:57:44 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:3eae:b70:f27f:7aa1]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003366af9d611sm7279693wrs.22.2023.12.20.07.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:57:43 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn , Gianluca Guida Subject: [PATCH v2 4/6] riscv: add ISA extension parsing for Zacas Date: Wed, 20 Dec 2023 16:57:20 +0100 Message-ID: <20231220155723.684081-5-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231220155723.684081-1-cleger@rivosinc.com> References: <20231220155723.684081-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_075748_204996_9BB0BED7 X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add parsing for Zacas ISA extension which was ratified recently in the riscv-zacas manual. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 3b31efe2f716..34f86424d743 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -85,6 +85,7 @@ #define RISCV_ISA_EXT_ZVFHMIN 70 #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 +#define RISCV_ISA_EXT_ZACAS 73 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 3eb48a0eecb3..9a9d915b5bb2 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -259,6 +259,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zihintntl, RISCV_ISA_EXT_ZIHINTNTL), __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), __RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM), + __RISCV_ISA_EXT_DATA(zacas, RISCV_ISA_EXT_ZACAS), __RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH), __RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN), From patchwork Wed Dec 20 15:57:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13500315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7979CC46CD2 for ; Wed, 20 Dec 2023 15:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4X0rlxMH32JN0KBubIbpTJ9Mc9UTvUkbxvN2YqBlEeY=; b=sQLrTlhMC4ZtcJ iECmR9YHsnldGvODtVCCFUuWW/+m09tmt8/AZizwUrAW96d9lO6RTI7TfNWQ7zt+TX4WnpxPX80ou +cWcOmfIkNJ+GU20RSwNyVk5XmGfW8ir3booBfCi/9giS3laK97mhvjw2w1TzvHLySKtRvMCQ3hpl AIwPR/LyaZPMpZetrGD6OtXgGYnNKEWRC4RtteyUGNlo/wTLLObLV6udbfJRV7rTSi0cYiYFR8Fcv DUI5QpymH9IAPFSuK5T8DWC5cGIMaXBUm6pMBXsNzzqYedefS9q22D8JPTQcVQ/pAofCP6CZnkwFm dx7BVyVufQjh9qMyFEhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxI-000KPh-1m; Wed, 20 Dec 2023 15:57:56 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxC-000KKS-11 for linux-riscv@lists.infradead.org; Wed, 20 Dec 2023 15:57:51 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40c32e205fcso9882015e9.1 for ; Wed, 20 Dec 2023 07:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1703087866; x=1703692666; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3BPMv24jdGVieLmHRP/43iA/a2qmOUrYJR1MkKgXts4=; b=nHL4rj0shMRFog8OMig+pIfQ3emZC3YfGxFWnUcTcQUK/6KSoDthnUunaJ6C7Lxz9B mnKAX3+lc786NIRY9XvWWgi/66WlSVRXit+t5wcVLDq23SR7q7d4tDM7g7mINnBKLhuQ gAqO362nZhRd5Isrk1KuLnppIKRQauM9CWUrO/OJWYLRe1Ct0OEXgkh9GHrbeBocqPOs QdrwJihre3vCpQaeLULTdatQtJ6FUPdYlt61+njqea+7Zm/nG6lPKV4w/pLa3csJZWry 1lpbhOHHpkEl+1UoDoEgAdpiuJbeVlxztzExFF8CrHwuSf2iQFteq48DfdJtIpUB8pvn wvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703087866; x=1703692666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3BPMv24jdGVieLmHRP/43iA/a2qmOUrYJR1MkKgXts4=; b=AtdG5EMH8KIGYcYy6Kph014mYkuDlsuGH04BCHa2SpP27//JqG87p0nmpn/JXjhp0x xvV56lFlSQDAnqn9/140eQTj/pB7OmRbJF67abLjJIftW0g6I3KRZNUVb/sjUVBK5TU3 MONQIk1At0LyHZKhrBeMxlo2hrRbOJMBP30rWPh50FVlY3L3zuu0+XTrmf6e5lZILANH fWekl7rZ8rhC1hTH+sUOpwyJU3+vxB3yF2AHu1ho1SjZqcjh6oE8SDVOge2CdHSflQzl l+5uUgvKVRlw7azMJAITs7P4DoSfqP97wjCiYD5qXwUFdx8apyxM+aPMqB2hGw3v203o htog== X-Gm-Message-State: AOJu0YxJ5wpFSwJv38fbgd1y+LoelTZe1KVw7Ww6ysG6az6ry37jtgAs EspPVb+0jjMGq6MT1On9aX44kQ== X-Google-Smtp-Source: AGHT+IHhRAXXz42/u2vdF2rRn+pcNPzJD+CGhaPX7dsedwK3pxf8bg5I86xeWYEngCYQhOlYz8+CIQ== X-Received: by 2002:a05:600c:3b98:b0:40d:3880:b046 with SMTP id n24-20020a05600c3b9800b0040d3880b046mr1065572wms.4.1703087865822; Wed, 20 Dec 2023 07:57:45 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:3eae:b70:f27f:7aa1]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003366af9d611sm7279693wrs.22.2023.12.20.07.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:57:45 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn , Gianluca Guida Subject: [PATCH v2 5/6] riscv: hwprobe: export Zacas ISA extension Date: Wed, 20 Dec 2023 16:57:21 +0100 Message-ID: <20231220155723.684081-6-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231220155723.684081-1-cleger@rivosinc.com> References: <20231220155723.684081-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_075750_358054_91E280E1 X-CRM114-Status: GOOD ( 10.71 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Export Zacas ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 ++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 10bd7b170118..bff68004ad43 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -165,6 +165,10 @@ The following keys are defined: defined in the RISC-V ISA manual starting from commit 5618fb5a216b ("Ztso is now ratified.") + * :c:macro:`RISCV_HWPROBE_EXT_ZACAS`: The Zacas extension is supported as + defined in the Atomic Compare-and-Swap (CAS) instructions manual starting + from commit 5059e0ca641c ("update to ratified"). + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index 01ac3dc196e5..ac65bb43c8e7 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -57,6 +57,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) +#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c index 6564fa9e7a7f..6c680c75ac0d 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -175,6 +175,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZKT); EXT_KEY(ZIHINTNTL); EXT_KEY(ZTSO); + EXT_KEY(ZACAS); if (has_vector()) { EXT_KEY(ZVBB); From patchwork Wed Dec 20 15:57:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13500316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56CD8C4706C for ; Wed, 20 Dec 2023 15:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WaaGBmTHu5Yd4KnWkl51rlAekVzsyPyUtuuwlTTNPxw=; b=T7OWZuM2B/18LX hsB6r5+pi7K1FYh8pIFU+aaTZ1RrdnY4q5Q4Og6m0lYQsq1/5GQdpZjw99Boew9Dc2ifAbp0OmikN uWCfJseQ1ejP2nH7qV9THlC5gUxFhD/Py/6nFtC0uStutopEXwix4/7/2c9BjpyvNEnfLA35nD0VK QOirCKziLA3RGPWxbe34lN1H7lJSEbJnDu7v9g52b8hFDZFxIa05QRY5sPUl5vEZ3LAXeB8uRiYWz gIghyZR4U7DNmC+oxP+JG1YtS/xMrKXZYCiP337HePp7toJ7d/XY2/NIBf9F6twNIpF8AAtO2+Bpd k4Wnz7JxQr3P0c3Lr/jQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxJ-000KQg-1L; Wed, 20 Dec 2023 15:57:57 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFyxC-000KKh-32 for linux-riscv@lists.infradead.org; Wed, 20 Dec 2023 15:57:52 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3367f8757d0so45869f8f.1 for ; Wed, 20 Dec 2023 07:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1703087867; x=1703692667; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TXiIygoI2xfoAtWyxNJaEZbhAX2C42esk/G1o5mFVH8=; b=U20dxp/QVH+052naua0PIKsU8Eto5QVztx1eawNQQdRDfYfyV6D2RKeKKhXuy1+BPe zFjQFA2C24W0UqzJYMMRDmgOHGM0MWGNr38GRCXekHTWF8KWhRlHdPa9Ka0FLWrz9pgG UkTbxjGkBDe32nCfRi106Z12ey5Xfx4/EwvoHg4oTUIH3npfG+d7uD3KTvXSx+oyNzbp ghSfjbVEvMtQcaBIFcjPEU1rnp91WuOgndNAuntdJgdUpj0Yw0E8lCvgWgkWUqws+7jM 2WpNobagwY/NcAucs/M1mRlGt7mWU6MvPjs/fwbUE4QqMzzqJool+pvCFeSUdKnN7/Nk EcCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703087867; x=1703692667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TXiIygoI2xfoAtWyxNJaEZbhAX2C42esk/G1o5mFVH8=; b=R3eTMCvExNCHCchC9x1CwAoSIU9wExt8IoF8u4o2xhRbbFHZ2bkKYv6MBZvcYpWmJP lnor/sAnOLAUjfD4Fo0TrayLnU8AbXckM72HRzIgWKDTeSjCqLatCPaNsVTg2sAubp+o gJvfjHzvdSP60OJxvxT29bYo0wi4Ue7xHqqq4WuZ+dVOtvDUb1SdYu1hOM18xn1c5MvE aRtdPQZn1X9R9NcK7gsklMv2CJTUTgvHVBJ0Pm5r9aHYtC3NSX1HfNwL7BpN5KdDH7Vp k8l4lah11o/bh4e3P++l47L01Zzfsf0E7FKaxADEob98gli1vvrB1qsWn1oz2soCq8gZ UMEw== X-Gm-Message-State: AOJu0YwuSIXC0djog3JuiBI6pbawIzNTcdBx5NQKeSicxXdYlEjyU7M1 xvuQ2Bp9og0EuNEZvO2TPQHE/Q== X-Google-Smtp-Source: AGHT+IEpr+96oxZFiK4cxomHHqE/jg1PvdGozQiMvvlQ4NTHaFlfmPa9ipv0kbSLSizkLF3AkktCuw== X-Received: by 2002:adf:e2c4:0:b0:336:4a0e:4284 with SMTP id d4-20020adfe2c4000000b003364a0e4284mr12246378wrj.6.1703087867017; Wed, 20 Dec 2023 07:57:47 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:3eae:b70:f27f:7aa1]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003366af9d611sm7279693wrs.22.2023.12.20.07.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:57:46 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn , Gianluca Guida Subject: [PATCH v2 6/6] riscv: hwprobe: export Zicond extension Date: Wed, 20 Dec 2023 16:57:22 +0100 Message-ID: <20231220155723.684081-7-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231220155723.684081-1-cleger@rivosinc.com> References: <20231220155723.684081-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231220_075750_981030_BE54D50D X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Export the zicond extension to userspace using hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 5 +++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 7 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index bff68004ad43..ee320fe7581b 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -169,6 +169,11 @@ The following keys are defined: defined in the Atomic Compare-and-Swap (CAS) instructions manual starting from commit 5059e0ca641c ("update to ratified"). + * :c:macro:`RISCV_HWPROBE_EXT_ZICOND`: The Zicond extension is supported as + defined in the RISC-V Integer Conditional (Zicond) operations extension + manual starting from commit 95cf1f9 ("Add changes requested by Ved + during signoff") + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index ac65bb43c8e7..fd7af0dddb12 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -58,6 +58,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) +#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c index 6c680c75ac0d..cca9b1e35647 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -176,6 +176,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZIHINTNTL); EXT_KEY(ZTSO); EXT_KEY(ZACAS); + EXT_KEY(ZICOND); if (has_vector()) { EXT_KEY(ZVBB);