From patchwork Tue Nov 14 14:12:45 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: 13455352 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 B0368C4167D for ; Tue, 14 Nov 2023 14:14:01 +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=M69hmiwYG58JWUmmSQDnf6UnxITF/Gjb8jLI/BJ3KDs=; b=xYQupn/lWo31YO GH6TazCXzGXEBe7G/t50aJPEK7G0xlFcvp3xykN+OtO1zdxpik419fdMgcDo67j5eV0bP88iCTUNc /2VS6oSpdnHir8lvRDeO1xi9hZDq2/P4CAAuq44sMXZN8VnFXGidSKE8ITWasxKXbzd1A/fQqr5Br GwXq1Yi9UoDGnVdY4C/jWaX2Hokn2RRCV++eX4S+awMxNd/MU8aGKWvrg94sc8virT45RYGFQcZHY oktG1bs7WzjVdD3m85R6V6mGIKjAB6nq4Ii2EQu+VbAM6L7cjmAEgF1NJKRnt8r0/EqjniLwP0xCG BX124KwgJXQHqdq2/Jkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2uAt-00G96p-0w; Tue, 14 Nov 2023 14:13:55 +0000 Received: from mail-qk1-f174.google.com ([209.85.222.174]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2uAl-00G8wZ-12 for linux-riscv@lists.infradead.org; Tue, 14 Nov 2023 14:13:51 +0000 Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-778a25cad6dso14501085a.0 for ; Tue, 14 Nov 2023 06:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1699971224; x=1700576024; 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=R1n1l7La6nGZIqWqCT5nqMrjtDpsd0w2BPU1/F2EaPQ=; b=dVDDPvkUWvj3erPvcBnwEjWRaGhW35WSssh/aDYxFY+bxtYJTlPjdXkfPV53UkLwZS zGhE1i43vo2/2OphP7QXYmrw8XHNV4CjHqhngbiImCp9jwuhXcBMXrwM9aQhcWaEroS0 tDXWrAzioeVr4B5p3p7Xnc2ga51zt4LT3eXpRwE2CmAueiTvM9wDdNlodZyUsEMkmKEx piAIj7kX63Ze/O6mQKpaJl9ErrNViPbnfF7EuCLyZHWJReWs/8drsqT6pwNSbR8Vy0Bc 3yNgvXxrfEyybOZaAji9ptlY5PEFWfeiWlqDThsBb2iWJME7SHAD5HM495ykaSoidoww Ni0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699971224; x=1700576024; 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=R1n1l7La6nGZIqWqCT5nqMrjtDpsd0w2BPU1/F2EaPQ=; b=J4p4JBMALQA7ksf7rx/ie1PYEN+wZYjYP2Twg/sHpYtku9jubMj7jtegPAGl22F2Lu i+Uf9tUw1yUJL0uB5aW3GYnqOzXIf3SCO94kh431tbjLh2mq6D2rpmDdh+ad0KtUbJFV YH9QNOMD4GRjgBZvHgt4w53Lry6RB4Et8J/JrzL6G8nlZxRAszynaBUWp6rrhrEZE8Iq lXkrsDZMp3yyMfQ1Rir/9/7dyxRp+TLzEWcuC18aNXG05jcKP4uNaZc/PrLyhQ1yYdfC oOLCucl7YtvSc85JKRNCVVtAl504TqFrRMDXAWiA+pyB8AgGoesz0+K1pT81uLrbEw+B YkZw== X-Gm-Message-State: AOJu0YwznIOQEc8lAaM1KwuJ28EbGBNhlu0q88l8rKaF9j3f+RSkQsxX 2cpXttf2eeThaVw9BOaa1nuOG6BTGGa0dXmAtRrKTA== X-Google-Smtp-Source: AGHT+IGdVmknHr9YfYcSME+isGh9g75eDYraT29RTc8VoNjDP7MZEDOfcBgxO+xlzZuc8oVMqtvnkQ== X-Received: by 2002:a05:620a:1a03:b0:76f:1614:577d with SMTP id bk3-20020a05620a1a0300b0076f1614577dmr2495334qkb.4.1699971224044; Tue, 14 Nov 2023 06:13:44 -0800 (PST) Received: from carbon-x1.. ([12.186.190.2]) by smtp.gmail.com with ESMTPSA id m2-20020a05620a220200b00777611164c5sm2701263qkh.106.2023.11.14.06.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 06:13:43 -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 , Jerry Shih Subject: [PATCH v4 09/20] riscv: add ISA extension parsing for Zfh/Zfh[min] Date: Tue, 14 Nov 2023 09:12:45 -0500 Message-ID: <20231114141256.126749-10-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231114141256.126749-1-cleger@rivosinc.com> References: <20231114141256.126749-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_061347_391387_DB324130 X-CRM114-Status: UNSURE ( 8.58 ) 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 Zfh[min] ISA extensions[1]. Link: https://drive.google.com/file/d/1z3tQQLm5ALsAD77PM0l0CHnapxWCeVzP/view [1] 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 477254668d82..6a6ee93a3c9a 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -78,6 +78,8 @@ #define RISCV_ISA_EXT_ZVKSED 63 #define RISCV_ISA_EXT_ZVKSH 64 #define RISCV_ISA_EXT_ZVKT 65 +#define RISCV_ISA_EXT_ZFH 66 +#define RISCV_ISA_EXT_ZFHMIN 67 #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 c4d0f16c29b9..7182cf278b1c 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -258,6 +258,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),