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),