Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3150639rdg; Tue, 17 Oct 2023 06:16:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGt4thY1QRTMY3Xg8rPMlpAHCh/lq9xWIJC65XBEiClzwrcg6Mb15FabpBRJsn9HOgN0I6D X-Received: by 2002:a05:6a00:98c:b0:6be:3fbc:763f with SMTP id u12-20020a056a00098c00b006be3fbc763fmr2657650pfg.13.1697548616090; Tue, 17 Oct 2023 06:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697548616; cv=none; d=google.com; s=arc-20160816; b=s6nBouQn4L+SrZtA127Qnzo5MjobdeDy62+0G3td8GgbkdBkiFNe1YhR1krEyskEnC +9zde96zAqwIJUDkQYLH3Heu9psw8gaVKCS6UE0mSilHyv8HmpKoCcoP9jyGdwOSUajq SWDbi4o6LPIfbtASFl2Efc+Q7O9lNIGqzwCstBQLR1Y+H66mqszP8PKaEq8coaqNEMOZ l/N50YwqZk0hhHbgRQWwi6H0/bm+rlSk1emnlD2BCTzlytiba8kUPuiqH5ODDjIavNNp jaGbKTR43cOwhqCzdlvopR00NydTOB+rF2NbDvy4okhUPwsrGGYTjcFx91U5DkOf2Op7 Lu7Q== 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=1HAW94BWBN5i9ceq6FqY8wdNnvu4aG0cSFSkPmGNLOw=; fh=lvGFqwUxN+Dx1jonz8cRGrvjuKDcjMXylffmtrJGOYA=; b=Q4HKt3akmW0mtBlMO5mvyodQ3nlJDwdTXW6ApEkPpU2DdcdVGPrS0i1DVN+ct6mrks 6j136/HzCYHN0OoEfu3Le1QHmUdTfHum/CFeWW3xVYgAUeMnUxm/u80QdwmnNFyPCe+y DPl2odSRodLAk7xlvyKjXt4pWfs2Jbhtq1qk/Eb8TaK2wwQw5rRtx3bXXG+eEWcu5fkj 9TDmvzyIKqXqcLgJa0RkeiXyRDpYXDTF6kfLJU2EIbUjphBe8rYmw4qEtmYQaqA5aOsP 8YCJnSXL7E0rFQhqyw/0IQk8xh0ta+7Xgg8MvBLRXMB5fwnlMUhv0BpVurB2souPN/vX RqGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=L1oyLJWZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id by9-20020a056a02058900b00588fa0def2bsi1889632pgb.768.2023.10.17.06.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:16:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=L1oyLJWZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 47C4B8028A4E; Tue, 17 Oct 2023 06:16:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343861AbjJQNQW (ORCPT + 99 others); Tue, 17 Oct 2023 09:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343864AbjJQNPo (ORCPT ); Tue, 17 Oct 2023 09:15:44 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6798211B for ; Tue, 17 Oct 2023 06:15:42 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4053e6e8ca7so18306305e9.1 for ; Tue, 17 Oct 2023 06:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1697548541; x=1698153341; 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=1HAW94BWBN5i9ceq6FqY8wdNnvu4aG0cSFSkPmGNLOw=; b=L1oyLJWZhrk/cE3FkrHFuJhb2oHjFDDui8MA9/Vulh75w3b1tR2iGxG4jwsnS2LfK9 V6qqbnQ+l+H3i6nDZDtzcVtH7AYmF1zTQkg4kCJR2+gSGVpDHG4x/74Ju7AmoaiTaFfd Yw6sNfvxbKpV2yz4olFOLyAfvRwqHE4LAaRDICvSCh+UkOXKz1obUPdmVsT+GROeuVPt eI7WIRJf35X574I1JnFPbj9dInfJWHIuevO43OQohKU5jBKT+u0uGgiArSjPDTW1heDq C53njOksvltnuR22SRVTqoyA10YOqL1suFrQRCf7GgFUBgI+H3Cyk00DCLnjyinK8VyY l7PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697548541; x=1698153341; 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=1HAW94BWBN5i9ceq6FqY8wdNnvu4aG0cSFSkPmGNLOw=; b=ol4k6Ft0DUTbHiPoy1zIzUeGoutSnf8Wr4nGaTebQWGyO2MGWqGCA0IodkdrV3+lEu GpJc2jv1H7s4Z2Df1FeGsc105Tvy7XU4XaLePXJyFX7W8bLJ+P5ABRA3UY91WBGMzL2z YqaLyH7ETgkdBSW5n01NcdQ8WXKKtHty0VHZgb5kZ0x2fKSAAlqVU/agBuKBX4k+2Ftw BOeU2FmXuZOdp8wq42JfwxUe4wN0erydkUzxCapj4tj+vFuPAn1JkrkT4p9hFOyTISar Q9Rb2+vDSdSY5VRqAN3RrxfAnl/nq7yWNUaWPD5qw4oJl7ht8XS73lGI0bj6Qs35cAO/ K7Jw== X-Gm-Message-State: AOJu0Yw961tiWXAbWWd8mN9Hh7ZrberVwI2ItOBOa+JMJxqeayTZxSHH tUhNsNicPrQ7UXjYf/FSjijHGA== X-Received: by 2002:a05:600c:2145:b0:406:513d:738f with SMTP id v5-20020a05600c214500b00406513d738fmr1640603wml.2.1697548540446; Tue, 17 Oct 2023 06:15:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:15:40 -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 14/19] riscv: add ISA extension parsing for Zvfh[min] Date: Tue, 17 Oct 2023 15:14:51 +0200 Message-ID: <20231017131456.2053396-15-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 17 Oct 2023 06:16:48 -0700 (PDT) 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 --- 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 a9aea62b6c6f..d9fb782f198d 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -82,6 +82,8 @@ #define RISCV_ISA_EXT_ZFH 64 #define RISCV_ISA_EXT_ZFHMIN 65 #define RISCV_ISA_EXT_ZIHINTNTL 66 +#define RISCV_ISA_EXT_ZVFH 67 +#define RISCV_ISA_EXT_ZVFHMIN 68 #define RISCV_ISA_EXT_MAX 128 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 0a74b2cdcacf..c70885f5014b 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -266,6 +266,8 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zksh, RISCV_ISA_EXT_ZKSH), __RISCV_ISA_EXT_DATA(zvbb, RISCV_ISA_EXT_ZVBB), __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), -- 2.42.0