From patchwork Tue Nov 7 10:55:54 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: 13448512 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 C51D2C4167B for ; Tue, 7 Nov 2023 10:56:39 +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=W0e+dXDkKNJoBJNWHS9paXjSTV01Zbkic7kR0Rjv4ew=; b=GEEdfmTnB6ztot /4zI2zNZXctn3CXFLAmjH1AbNv77P7Hr854pIaEO3mWcdx2SmB8JL7m4SYl58Ul1a0/nsSS6Cpq+n MDjF0bAU3ISSoN77iKh+Sd56JXKe0tpDnhzanvg7GMTr2SPNoZqp8qP/eZ7M2SSgRXmd2AXvFsa36 /9gPa+nKDCBgQetrn8IQuoCXQMyr6oYCuqc0HYipgqNYuIjR1IbS7wLQlTiTlCh96PbDyTB3kdake rsQpJ0ehq50esr/JIpMcWcULa24XrpJdqrAK0AavPteR1LcX0ClgChKTBHEosJ7Ebo9nzo8fgQ3AU Yahrn6eo/pHa6kAV/9wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0Jl4-0019cv-1v; Tue, 07 Nov 2023 10:56:34 +0000 Received: from mail-lf1-f51.google.com ([209.85.167.51]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0Jkw-0019Qx-36 for linux-riscv@lists.infradead.org; Tue, 07 Nov 2023 10:56:29 +0000 Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-509469f552aso1185599e87.0 for ; Tue, 07 Nov 2023 02:56:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1699354583; x=1699959383; 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=hPj7UJhNk4bEKBTXmbiQszNoP65XhPNjIiphPr/bFIg=; b=A3Uk1L1btQ+k25SqptMY6r+0Rw6rZq3W2GmNwXsLve0F2gBX4s6Cuv8oyirDtnu3hv XXJcIUWkFR+DPLxBbtRLSDsbGPVK3Xf097CLYj4Uc+3njFxgqpIKLM7stfDKfqtxYZeG VY4TL/1NCLZCBkcrxpUADKotMpjDRjxJapMLSZNZxYdS9uXqIahn401yOLOFTaVQOPkc /3c5N/FwRVaD7ZzbqoDSHSDM8WA6ihkZKjUlec9jD8wLNxMNrvT44paocOTYobECh6M1 Ah5w791g2avUCk6rN55Oh4kYJoQxamnk5NuodQZcF0getCuB0aQZwrV1Ci10KPpe8m82 FrKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699354583; x=1699959383; 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=hPj7UJhNk4bEKBTXmbiQszNoP65XhPNjIiphPr/bFIg=; b=vs4apdqN+wvXqg7J3jjIkvYlyEdkLiStpe8z6sbCqV8XOtdnIIOjllQ45ogTuSUJa4 Uxw1ic/23Ikia7tc2EbB/PFWcF9D48itqRFP7R6KETAR4SicTwo3znusZGT4B/Isq8b7 yIEPSiqTuWG6UBJ0dZbsWpK3aJq973BM9wXkCcbPKSshrgZaPsxgdzj99I8rf5GSTyS7 OdOavpgJD8Sgu+fP0iLChMDV8tDiYnR6vl6JdoiCjuRaj/hgvpBVToI8MZUJcP2AQect zw7iCbuXRAKazrgwFn24LcywbVrI5WDuMgU44f3EfWEykBm+agEA7NneyatNYwJ3vWPo 4PPA== X-Gm-Message-State: AOJu0YxULiSpHf2tDvd8DvwOfnaN7mqPp9VJqm9m/NDQ0L2vlYrsf7L1 6Rn8kQXwDcunyBa/06dE3NLKZf0bo8amEjWkul7PzQ== X-Google-Smtp-Source: AGHT+IGRA2Jq7n60JiFQFoG9YMwZlINwiDybS35zq6fryGJBSKL1K+FHC6LMZd0w5ZY6D/nx95IeyA== X-Received: by 2002:a05:6512:3196:b0:502:af44:21c2 with SMTP id i22-20020a056512319600b00502af4421c2mr23556282lfe.5.1699354583017; Tue, 07 Nov 2023 02:56:23 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:7db3:bdd9:4cab:2ee3]) by smtp.gmail.com with ESMTPSA id n30-20020a05600c501e00b00405442edc69sm15396853wmr.14.2023.11.07.02.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 02:56:22 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Evan Green , Conor Dooley , Samuel Ortiz Subject: [PATCH v3 18/20] riscv: add ISA extension parsing for Zfa Date: Tue, 7 Nov 2023 11:55:54 +0100 Message-ID: <20231107105556.517187-19-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107105556.517187-1-cleger@rivosinc.com> References: <20231107105556.517187-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_025627_028619_28F69E8F X-CRM114-Status: UNSURE ( 9.87 ) 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 Zfa ISA extension [1] which were ratified in commit 056b6ff467c7 ("Zfa is ratified") of riscv-isa-manual[2]. Link: https://drive.google.com/file/d/1VT6QIggpb59-8QRV266dEE4T8FZTxGq4/view [1] Link: https://github.com/riscv/riscv-isa-manual/commits/056b6ff467c7 [2] Signed-off-by: Clément Léger Reviewed-by: Evan Green --- 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 752be910e7c3..3fceae60ca39 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -86,6 +86,7 @@ #define RISCV_ISA_EXT_ZIHINTNTL 68 #define RISCV_ISA_EXT_ZVFH 69 #define RISCV_ISA_EXT_ZVFHMIN 70 +#define RISCV_ISA_EXT_ZFA 71 #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 0b9d16ea71f1..d58c8e9ceb05 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -261,6 +261,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(zfa, RISCV_ISA_EXT_ZFA), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH), __RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN), __RISCV_ISA_EXT_DATA(zba, RISCV_ISA_EXT_ZBA),