Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3150369rdg; Tue, 17 Oct 2023 06:16:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgMdXE+alxMHD0WzRgyszXZS5p5FEAaSdVdJ7hrS0IVk2gOdJQpfBKV+Jibm75/6kZ+XAU X-Received: by 2002:a17:90a:1ce:b0:27d:701:c083 with SMTP id 14-20020a17090a01ce00b0027d0701c083mr1942942pjd.29.1697548596698; Tue, 17 Oct 2023 06:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697548596; cv=none; d=google.com; s=arc-20160816; b=ROvhrLlcHbjp2+xGuMK5B7tMc+6XZhmCOU5CXLmGQnDUZmSSr8LshKp5CyzdMXdnIK TZJR5L/rUZp+W3Zk01I1a9oZd8KgeTFeJB2KBHARUd20HKUjRD5Et6+tcwm4qokiHvwp B7Frq5VRTTtBJ6jNIXyxel3nQh2juZXRacdaEZqjPXtDEnyLkr9GRcwvcs568X10/CQL AoOcnZMAGCUpBDeV5ZT+n8KhheFQ4MZT/e7xHGMj9JzfYQhst3/p1kKDHkqvWbVzAOQI 8WyWRqKlN1peK/zzVFxlmFWbwyRsf58R1JwGCjGP9DQINSs76M7gMxmWi1izIjtlugLb UVag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bR5zOKPIIXQcPWK7Zwi8IMehempNxAt19rgFARaEstc=; fh=lvGFqwUxN+Dx1jonz8cRGrvjuKDcjMXylffmtrJGOYA=; b=m2j3WiCeoM53mhLjF1jMG0SczoIBvO9jxjnJ0HR+V8Zg3wnhwI1GXP0Dv8S2YhOIWA 99054VVb0rY1WeQuQIQsW4XXUmkMEkjlGHKbtcpYGCwj2mZIEgEPEaA9P2r47tg3oIuK OQ8ieR0LqSDJdV57XVJcxrZOLUkHsAnaY/NxldaQjgPCTsf0IVOgibj/f7fIhz5L8Asz pKE9HB50lr5mT6tnrDfaAqyVoBrsMYBJzj1XR6t4SKLrZgsSd1AYy8nAkI7HIPF/mtUr +nMYP9+RwvXvOgvi7lh3IOEQhoCpLCPSBdThPNj2zRlX/s0y0RwsRSc/y7f7wrhBA821 wIMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=GteNGw0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id w5-20020a17090aad4500b00278f81e54cdsi8942452pjv.19.2023.10.17.06.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=GteNGw0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CE7818036EB7; Tue, 17 Oct 2023 06:16:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343900AbjJQNQE (ORCPT + 99 others); Tue, 17 Oct 2023 09:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343827AbjJQNPh (ORCPT ); Tue, 17 Oct 2023 09:15:37 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39FF7F7 for ; Tue, 17 Oct 2023 06:15:36 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4053e6e8ca7so18306115e9.1 for ; Tue, 17 Oct 2023 06:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1697548534; x=1698153334; darn=vger.kernel.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=bR5zOKPIIXQcPWK7Zwi8IMehempNxAt19rgFARaEstc=; b=GteNGw0RyWD1HuywyBU6lGdXgWwjSMmPz29vOwc5ZrGHlIXHkjILVC4xB2YK0ClVvk lisCpEVBhIBS9usDRQI4TYmIKjfIp7nJTp91u01Ign+hpxpgxcJrTHfshw1jRQ8MAxPL NTL2eV7XIqX7rZJS4Jm23Uer25LMLMBQsIiqqvOOqdSnVFB4TdtUETT7TI2hOAqlGzkm MwWR5/Rzuw2Wnq5i+z303MLPuibrZ5LVyRBbJlYh/PyHOwVk9Pi/NEenW2RQ4Af/t8hI diinzbTnqdxI7pz3KtcaRXr3/d4BkOx1qQzZ8TIfF/5SqkIuos21CpcRYxwaNB4x7HW5 jV+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697548534; x=1698153334; 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=bR5zOKPIIXQcPWK7Zwi8IMehempNxAt19rgFARaEstc=; b=Dsevra3yd0oVyMk5otdboJdxpv3AjQyMm5tiw68zmRYWz9d3yiNhdChdxib/d3OqbY ekcqe+D0RLlRmqQPuX+07qyqtgBkSC+aBK9WXhCOhF5mqDlniFPZAh/kJj8rTOlYnNAa ssRn5atCBL8eL0a/EgnNmK95mG9KyNi5f49UigUCT9uCSNt7+m0T7iOzmhjekqSusBmz jRw3KUiLlqIwLQX8MwDW0cUSG+87RSyi6x5y358tpVrCygEyNkdoGjZyfQpzPFBHxS8M IGzmR46tLWpY+0I3k28UCy5r8JBQM2i0eejbN/13eOucDC4Pi1iuzw/Lla+EbS+QDM3K M9Ig== X-Gm-Message-State: AOJu0Yy+LZnb5SlgepEGtEQjL6KvvtKChkdG+fEd3jSpiJYyadmVuX1h 20WHKxww/Trj2d3PjSBV3+POIw== X-Received: by 2002:a05:600c:2145:b0:406:513d:738f with SMTP id v5-20020a05600c214500b00406513d738fmr1640332wml.2.1697548534165; Tue, 17 Oct 2023 06:15:34 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:96:820c:ecf7:a817]) by smtp.gmail.com with ESMTPSA id fj7-20020a05600c0c8700b0040772138bb7sm9873393wmb.2.2023.10.17.06.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:15:33 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Evan Green , Conor Dooley , Samuel Ortiz Subject: [PATCH v2 08/19] riscv: add ISA extension parsing for Zfh/Zfhmin Date: Tue, 17 Oct 2023 15:14:45 +0200 Message-ID: <20231017131456.2053396-9-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017131456.2053396-1-cleger@rivosinc.com> References: <20231017131456.2053396-1-cleger@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 17 Oct 2023 06:16:28 -0700 (PDT) Add parsing for Zvfh/Zfhmin ISA extensions[1]. Link: https://drive.google.com/file/d/1z3tQQLm5ALsAD77PM0l0CHnapxWCeVzP/view [1] Signed-off-by: Clément Léger --- arch/riscv/include/asm/hwcap.h | 4 +++- arch/riscv/kernel/cpufeature.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index a2fac23b0cc0..bead05cb0df2 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -79,8 +79,10 @@ #define RISCV_ISA_EXT_ZVKSED 61 #define RISCV_ISA_EXT_ZVKSH 62 #define RISCV_ISA_EXT_ZVKT 63 +#define RISCV_ISA_EXT_ZFH 64 +#define RISCV_ISA_EXT_ZFHMIN 65 -#define RISCV_ISA_EXT_MAX 64 +#define RISCV_ISA_EXT_MAX 128 #ifdef CONFIG_RISCV_M_MODE #define RISCV_ISA_EXT_SxAIA RISCV_ISA_EXT_SMAIA diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 8cf0b8b442ae..68914b5e2df9 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -244,6 +244,8 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zifencei, RISCV_ISA_EXT_ZIFENCEI), __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), __RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM), + __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), __RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB), __RISCV_ISA_EXT_DATA(zbc, RISCV_ISA_EXT_ZBC), -- 2.42.0