From patchwork Tue Nov 7 10:55:51 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: 13448511 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 6BD75C4332F for ; Tue, 7 Nov 2023 10:56:38 +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=8smYV6ra1HxRjI+0UI7H1NNNI8jYPhH3Ca/O4iYO1MA=; b=LST0ARx8g1k+sq wpdSbWO8IiOu0FD4ZKgSzVSp+BlrxakaKOWXYFSFuAjfcOhAIf5C1Ce1aUU4lqtf5vD03u1YhLaoi JV/siT6WFsLlWG9MxISFUG1BWG75YPY5DR284+e1nwAAPADc6ogtyN2oCHBap2Ti7ZYtIu+KBWrMD VO02P5yNa9whHUZWwsA3CBxYVEaiHigA3zW9iT/exTEM5qQiivFqsYJjTBr/kPOkibbcrIusWs1r3 /RnxQ7wigMCigp4fRJ7olsOo+4r/jBxdzfipvYA2X4z0AwBcAgVRtdUrbuwoF635cRDhVGJC2UV1g xON7xfvR4yqzBkzsqr4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0Jl1-0019Ys-1q; Tue, 07 Nov 2023 10:56:31 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0Jks-0019Kr-32 for linux-riscv@lists.infradead.org; Tue, 07 Nov 2023 10:56:26 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2c504a51a18so11222541fa.1 for ; Tue, 07 Nov 2023 02:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1699354580; x=1699959380; 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=VpHOk3VsdqfpPenBw33m97LFdLmT8/1+lQVgF+3Qq2k=; b=wPwCXXyUaSbE8p3LLbCxWaZabVYenT2tI7DAQzPTGyx8dVet1YZ9EB/JpI0X5pzs7C aL+PgLCyL0gBBjH2c6N89WaMXW3bkdfOEJeWPL7Ad3sdKqj4hhhm9hahntSEGswWkBQR B0lciMKuZgNrcES3sG2EX881ppH9YZhfZwmh+LM2c80uARV+jxj7kdGxaxXVjp7DgPR+ MDW2tMTMJg6mPg94DEvQxLi3hrLq1kbW25wTF8rj6c9mK7vp31UePk7lPCtxvZ/hojKY 1eY8R+jDDE+tuFKbvp4pC//iEFuswWPn+cXH2vECmxAqFcZgV2wCHFlJh5nBs5ODw8MD apKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699354580; x=1699959380; 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=VpHOk3VsdqfpPenBw33m97LFdLmT8/1+lQVgF+3Qq2k=; b=Kj+833ZbCsg6lJeNhxwGveW2P17gTcLUiG6UxJV030mVmiRwrQMX+XsscaOAf1xMlq wJB43llTYwi1phmf5ZaELOXkSsqaDz7KIjhbu/0/NDpDUlPs76gmWKKwKlr/fUTWcszT uty0QW8VP1twijBjaJ81pnE3jZILXi42UxiATg0weOneq4EzB12eIpWH8NtOgnU+4UV8 gSHQS4vf9WSA94YtPgoLr5DRWf53Jo5Br4W5AP/f4aoW/kOFQrbEQEzCZlHkDUq+2YsH C7QaSjiy5VXyhmZ2xDIBVJ3INLFrniNgdd6QQJOVYLfkW2rUtY2MyzHDxmZJ7mEhEM/P fOVQ== X-Gm-Message-State: AOJu0YxARuLs4TmjTvBPtUwMCJHAA6P/Q5ye6VOK+z9zo/PYHuoYjBLC NOphskBIC/MddN/OR4Z0mjwW4dQHVmTqKPO8HRUuVQ== X-Google-Smtp-Source: AGHT+IE+q2UlEWc6Qe9yztVIb0UfK9b3Z8SW8kIF2An9w1ZlDSwjmA5V2PrJhbGY+LL9yCEavwTs1A== X-Received: by 2002:a2e:980e:0:b0:2bc:d505:2bf3 with SMTP id a14-20020a2e980e000000b002bcd5052bf3mr22410080ljj.1.1699354579680; Tue, 07 Nov 2023 02:56:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 02:56:18 -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 15/20] riscv: add ISA extension parsing for Zvfh[min] Date: Tue, 7 Nov 2023 11:55:51 +0100 Message-ID: <20231107105556.517187-16-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_025623_019703_9315B419 X-CRM114-Status: UNSURE ( 9.14 ) 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 Zvfh[min] ISA extension[1] which were ratified in june 2023 around commit e2ccd0548d6c ("Remove draft warnings from Zvfh[min]") in riscv-v-spec[2]. Link: https://drive.google.com/file/d/1_Yt60HGAf1r1hx7JnsIptw0sqkBd9BQ8/view [1] Link: https://github.com/riscv/riscv-v-spec/commits/e2ccd0548d6c [2] Signed-off-by: Clément Léger Reviewed-by: Evan Green --- arch/riscv/include/asm/hwcap.h | 2 ++ arch/riscv/kernel/cpufeature.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 5b57b24db60c..752be910e7c3 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -84,6 +84,8 @@ #define RISCV_ISA_EXT_ZFH 66 #define RISCV_ISA_EXT_ZFHMIN 67 #define RISCV_ISA_EXT_ZIHINTNTL 68 +#define RISCV_ISA_EXT_ZVFH 69 +#define RISCV_ISA_EXT_ZVFHMIN 70 #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 baa8edfb0e6a..0b9d16ea71f1 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -282,6 +282,8 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zksh, RISCV_ISA_EXT_ZKSH), __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), + __RISCV_ISA_EXT_DATA(zvfhmin, RISCV_ISA_EXT_ZVFHMIN), __RISCV_ISA_EXT_DATA(zvkb, RISCV_ISA_EXT_ZVKB), __RISCV_ISA_EXT_DATA(zvkg, RISCV_ISA_EXT_ZVKG), __RISCV_ISA_EXT_BUNDLE(zvkn, riscv_zvkn_bundled_exts),