From patchwork Mon Nov 11 20:54:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Gupta X-Patchwork-Id: 13871359 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E827D3ABF4 for ; Mon, 11 Nov 2024 20:55:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4B4758D000A; Mon, 11 Nov 2024 15:54:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 463F08D0001; Mon, 11 Nov 2024 15:54:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 269EA8D000A; Mon, 11 Nov 2024 15:54:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 031668D0001 for ; Mon, 11 Nov 2024 15:54:57 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id AE787C1383 for ; Mon, 11 Nov 2024 20:54:57 +0000 (UTC) X-FDA: 82775017836.16.8ECAF50 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by imf03.hostedemail.com (Postfix) with ESMTP id EE89C20006 for ; Mon, 11 Nov 2024 20:54:36 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=SqiSc2X8; dmarc=none; spf=pass (imf03.hostedemail.com: domain of debug@rivosinc.com designates 209.85.215.181 as permitted sender) smtp.mailfrom=debug@rivosinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731358367; a=rsa-sha256; cv=none; b=TmIpaBzodeNJRCUkgCI3wkBjgnxMilWWodTD6KtaySJLcOGyjqgPfoD4kVKTpXfvja2GF5 z9L6sBJ7CmS7AEeTD6qZrn4v6MrQEOgTj3/Xc4h7p23eWUaULX/JTjcJQsYDZSZIkPIKMx ZoglUpOfVbPrfP70VNzMmA6te/Vc+rA= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=SqiSc2X8; dmarc=none; spf=pass (imf03.hostedemail.com: domain of debug@rivosinc.com designates 209.85.215.181 as permitted sender) smtp.mailfrom=debug@rivosinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731358367; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=289Nwoms47JcaO8kSApuumW+ImHm5WLKWOrCLSEYkbY=; b=z5yA8Llj8FEBDefXb2xxvlYxt7UrxV6L5ja4hoV6vBTS+35c0Mw581oDBJZ7rWjODa1RJq cmp87N/gML+uck9Kb1EEP26EfTSsCIDfM2gYfwEP9s9YdjS8IhWsjCtWsUZg10ZhwlF86A PE0ymSXp+xtSH5j6AD1QfilmZom9/yc= Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-7ea8c4ce232so4338613a12.0 for ; Mon, 11 Nov 2024 12:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1731358494; x=1731963294; darn=kvack.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=289Nwoms47JcaO8kSApuumW+ImHm5WLKWOrCLSEYkbY=; b=SqiSc2X8SoOqZXgDE+Dl03Iq5DZF6oQZdkQRE/fh4t2c9O7i7E5Z3/zY+UcF9c1Bia PnQDIEKbf04geIlEZbWERKXOc8WjVWpYrIBArIi9X8+U2JPzVBhbGiuyjxYPIKNEraWF Q4PiG7S/cCd8PjtZkfwM69SFOHOSJmuNYyNdaPyilnOSJuxnBjt79066Z1qH9V7YkXAL z2lvg59WjFE4B7SLkk3GK3MxTRZMgrP0kB5+XayPZzerRlEqGYoUHfn9y/A3+CON50B2 qDfeeSf4qy24aCPiliIEiC4kfrl7ObdSI4ScoFBcuqaX/XbJ0lu38dj7pZH4aDE7lJLF bxNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358494; x=1731963294; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=289Nwoms47JcaO8kSApuumW+ImHm5WLKWOrCLSEYkbY=; b=cEs8inVnz2MuJDHAZ4pwSzULwq4CZAgge+Nn5SL3mwkUcUv0fVU9BDxueXiwFV299t spiodaKilRW7JhLkK8e/ob9NMwEcb9iCOLunlINJcRMlOiQq/7U67J0KA/PkOqchNZpE jkaVwaKfo3bwCwUVjQE5+Nofgh4gW/GT7lAeOUjijwslUTAiQ2BH8QF2+CrpFBUyltx4 7TlyImoz+6z4ApOFaHKETNGVyalAL2kfbX60R98I0gPe4gwRdUXnJGTtLrWa5LmcyplT a6nUyP/VmTr0KzP2sMSan0XglFJsOUXMfAbJpKoeKdZsokIDyxpaNThyML8jyYvuGHgS tjyg== X-Forwarded-Encrypted: i=1; AJvYcCVS7vC3wdYzlAphZDlnfzx1+7r3vBYGrBl/rWxXY8H3vztzpNAy8vSmskHPkd3JBquS+XA7bEPNCw==@kvack.org X-Gm-Message-State: AOJu0Yxh/QKGYs0ELilZdZY4Giqv9nhiJHI2NDCYRWp/57nZm6IZbl2M eTbLmFPSY3DSQh3nziOiQ5o8A7EtyHWiB/tw5RZZVQ86Fc8lkOI5M7ZE3mCQuas= X-Google-Smtp-Source: AGHT+IFgfaWfDVg2ag1aCv+RvJc7LebaoP9wiPFi7bt9E035lNfk9/OuTdzMOTjykOKHjKVWywhO+A== X-Received: by 2002:a17:90b:5310:b0:2d3:cd27:c480 with SMTP id 98e67ed59e1d1-2e9b1787df7mr18295211a91.33.1731358494513; Mon, 11 Nov 2024 12:54:54 -0800 (PST) Received: from debug.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9a5fd1534sm9059974a91.42.2024.11.11.12.54.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 12:54:54 -0800 (PST) From: Deepak Gupta Date: Mon, 11 Nov 2024 12:54:07 -0800 Subject: [PATCH v8 22/29] riscv/hwprobe: zicfilp / zicfiss enumeration in hwprobe MIME-Version: 1.0 Message-Id: <20241111-v5_user_cfi_series-v8-22-dce14aa30207@rivosinc.com> References: <20241111-v5_user_cfi_series-v8-0-dce14aa30207@rivosinc.com> In-Reply-To: <20241111-v5_user_cfi_series-v8-0-dce14aa30207@rivosinc.com> To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Christian Brauner , Peter Zijlstra , Oleg Nesterov , Eric Biederman , Kees Cook , Jonathan Corbet , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, alistair.francis@wdc.com, richard.henderson@linaro.org, jim.shu@sifive.com, andybnac@gmail.com, kito.cheng@sifive.com, charlie@rivosinc.com, atishp@rivosinc.com, evan@rivosinc.com, cleger@rivosinc.com, alexghiti@rivosinc.com, samitolvanen@google.com, broonie@kernel.org, rick.p.edgecombe@intel.com, Deepak Gupta X-Mailer: b4 0.14.0 X-Rspamd-Queue-Id: EE89C20006 X-Stat-Signature: nyxhgm39ksyfy1gdwp4qmym6eqg5bzte X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731358476-793413 X-HE-Meta: U2FsdGVkX1+qhMbWj2tnSI9Enos5eyCfAfffxzTkBwAyP2BOrT++fiAmxpPnfAIdPV7yMAE/ARCmLzBUwe8t4mM49NSwLGctxCSeKLPhv7nlJuZUFK1a8oCK+9Fku6DKnAWrqBehAnB0CG39OZiWM2FSn+FMntN/o/2fA+f7Kan7z7Wf+Voa1nwjnBPN2odjjM5pnVHg1tvBEgA9QGF65numZqAh4d2PG2QNV9ZoYevwUlm+EEGr6znrnRZzUxqKl68suimF1Jnmj1ruYFHmwISYa1JBXDrqFB1r3rAwhur+Elhc0mII4dbOcuYug9KSv8dvLW4bnQf1rS7eYNfPEOJZw4Mx+UNeifNTn8DQZdou3kuLNC0qw13jjXg4zTHHyg7dIxbcIfWGofey9E72toCsp+FkLBB0bOWJW0AByh4rbDiv0Z3RQIiEYEew/rI68pQTZEvnzkTBVTcOXpAcXgxAYdDM7xty1OReBnHtBoz354s4wmk2W6ZrhULFYXttWKPZcL/7Hg4GWafUkpAsCK07LENavUsDfBH0Q7bVXDgCl/ps6lx86lppykPaIsLTFUok5PfcfWROAimAexw/yufHS5GtigG5XKhOJjdLwQNawdTA4BBd/vijddA4yBDhxSrSp2D4DpQKQ6cHOJvRD1hAWreE/RDphMYLnO/y1mU5yOoUHf3r4IlTTORtatMbP9FBs5kV0HZOdtyQEbSY7HthaMT1UDCPQ9UaJ1zjR69OJc5AoMgvlwerMc4q3E0PT6bAhnrS1BLTSUHw30eI+Aq9sXiSQxs4HoyQyvdmsnZ5nvoCgOg4x1rHLmTXJX7S8SO8IfAHTjZe81i6JStp/LYJ3MKTyRVFEVLzbrQt295IhCooP4DhlgJunEjcEbsOSDkrBQ31SIxbDkOjPF4nPm/+KSPQPblf0i58Y6bUflBSR42MMfbiEg5o+Y28gG51OBFi9LjpWuRQ9KEn4DS KZVZrtBo OdUN/84FgmRGHEn50oPzmXUQpL5UKqoB4tvd2N4/2/zKAO+htEIEXJWd6adh1up6TFDpR89KGfCiOL9pUIe3sDT+DTXrkdDg6Bm2MBajp5P2mcVNUXFspX57O95AyWy4hIbHOreOYbngECEIagNz8s/531MTDbjz851p7RVGt/RplyQDGrS52XpeedEy4EDFsaN0R4+W6xP0h1YooWRDgI3RRTnaqYtkJL4v8Ucsl2npjKkDQqOpkpNPviK56FlbzJAWRfjfzZzwzcNuGQCJBkPHcOUbemqUMTlzH+KcjUe7Vc7+UhCSFqlzH7Yrtg09jNNbK+IJ92dq+gmM8HC1u6yWF1bRF8HGt2zHpeCpj6lz44b/j2gxPdhC0xAPhfaUFD+rPlCn9qZBSqWnvb8/PNSALDuWL55JnLzelwizAGpHGal/LqXWVbMNFWVvRzKbMno/2hmc5oBaoih8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Adding enumeration of zicfilp and zicfiss extensions in hwprobe syscall. Signed-off-by: Deepak Gupta --- arch/riscv/include/uapi/asm/hwprobe.h | 2 ++ arch/riscv/kernel/sys_hwprobe.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index 3af142b99f77..ca64b07927cb 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -73,6 +73,8 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 47) #define RISCV_HWPROBE_EXT_ZAWRS (1ULL << 48) #define RISCV_HWPROBE_EXT_SUPM (1ULL << 49) +#define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 50) +#define RISCV_HWPROBE_EXT_ZICFISS (1ULL << 51) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c index 9050f3246264..716d72abec60 100644 --- a/arch/riscv/kernel/sys_hwprobe.c +++ b/arch/riscv/kernel/sys_hwprobe.c @@ -107,6 +107,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZCB); EXT_KEY(ZCMOP); EXT_KEY(ZICBOZ); + EXT_KEY(ZICFILP); + EXT_KEY(ZICFISS); EXT_KEY(ZICOND); EXT_KEY(ZIHINTNTL); EXT_KEY(ZIHINTPAUSE);