From patchwork Wed Dec 13 11:33:00 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: 13490781 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 07093C3DA6E for ; Wed, 13 Dec 2023 11:33:32 +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=zDul2L1/Xwe5Z7JpNGTox8/yOyvUiSGV7/0HztQnAdw=; b=B5VDFZdYKg105m djhUOEF6Yh6qv4KOl5n+K9p/Wl+rjvm00BHQ5z5U4Kg1W57FPVk7caTKuseceTn/BSKlhJt2VOqq2 iMFRKSgnx5q8Ib2qpzr9PcxrBmtEZtH/5pF3uN221kSjz3Jgvil1rL+SSfU22kbkI7ApOqWtZgn4C IvEqIeGB0m4lb4R1XbTWXRgcbNcb9vWV939nrY36FrUMv+5bx+uqsGB0M1bAfawc7hoGaTI23rpLX R2QdEjt00WmGNxdlMxaAWw0BYWTl7yXdnXMDX4znpF9ShUVKVf2iQejl5kj92l4LPgc0xGeOp8E68 PJexRuTxQKKm2r9hKozg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUV-00ETAM-0G; Wed, 13 Dec 2023 11:33:27 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUQ-00ET2j-11 for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:23 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40c192f488cso11230925e9.1 for ; Wed, 13 Dec 2023 03:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467197; x=1703071997; 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=zJ7qFvLPI16XitLVU7jac70czdbEyCJmCnGlh/kcFn4=; b=qZzu1r1gQx92nSzWDWTlaXFyd0FNHjgUWGZXm3gptEwVKJTY/B9m9V0lDmthOSiFnM 3IPC/kYsNhFRaCUIS2gmWb94Hnc4w7kDYvwbF5ZIhH1hk4AGs4AyLBqRU9WyDVzQ8hQT MVueyOZleQlLkAyBZN3MyIFiW666U7UucfBfVGRVaFnSbx6myuRv+ts8DO9rTuPUzpOG CQ2XAAcdIqi+uq1JTL02RUOpKtasUT+8f51SZaWaIN65IMib2hey1YzznX5/eLoGz0wm 1tS2bQHYmLISTxHZPl5ayYhfA18/oXNaXsgMSkl97Gm8Yon8AezsH5HAL4hWpS0mboHO 7CrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467197; x=1703071997; 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=zJ7qFvLPI16XitLVU7jac70czdbEyCJmCnGlh/kcFn4=; b=TRAYtv6E4ZiFnnh6I3/dOVFfz5wI+sBdTe7FhsDNRqwSqaYgVU/ODf/HQsyIE/XWLy ZAjVf2J+hXAkIc/qIQtCrqkpO1fjJl4EWgHEWtCijVm1+NufDn7pWH+iPQZrnNHrakUp zBsjpOVZZIaAZCHOJcPhLThaGsJgNKnCk7D15TONBl3QPKuIhdeoKGEUIastQ5Ivo4x9 iHxkxMjhs3pYb3luPBs+2yczSCOHna0G/zLx9YFwgsTKSavBIu2CytVukPujXR6Z+P21 FQuE1rQ7yCJJNl8TBfPS1f+OfsEmAWe2xGu9e5Zxl+R8MlZL/xwkqx3DiwmuUskvXKyz 4vfw== X-Gm-Message-State: AOJu0YxHLuqQmRfQrpSzcQJmccGUoB9/FDWomflX5RfRAdBZwGXryB6Q TdasNL2oGcYKuZPOo61XhvZYVg== X-Google-Smtp-Source: AGHT+IFSZAznHPSK5PUles9w0ak3hYXLoPc4Qu5KPjMvXQBkR/ftanO0CSh3prHsJkQveJSFnBCRzQ== X-Received: by 2002:a05:600c:1d9b:b0:40c:2960:9603 with SMTP id p27-20020a05600c1d9b00b0040c29609603mr9614366wms.3.1702467197077; Wed, 13 Dec 2023 03:33:17 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:16 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 4/9] riscv: add ISA extension parsing for Zam Date: Wed, 13 Dec 2023 12:33:00 +0100 Message-ID: <20231213113308.133176-5-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033322_358354_9BCEB675 X-CRM114-Status: UNSURE ( 9.57 ) 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 Zam ISA extension which is part of the riscv-isa manual but was not added to ISA parsing up to now. Signed-off-by: Clément Léger --- 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 3b31efe2f716..016faa08c8ba 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -85,6 +85,7 @@ #define RISCV_ISA_EXT_ZVFHMIN 70 #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 +#define RISCV_ISA_EXT_ZAM 73 #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 3eb48a0eecb3..e999320398b7 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -259,6 +259,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(zam, RISCV_ISA_EXT_ZAM), __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),