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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1AA2C636D4 for ; Thu, 2 Feb 2023 15:02:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232171AbjBBPB7 (ORCPT ); Thu, 2 Feb 2023 10:01:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbjBBPBy (ORCPT ); Thu, 2 Feb 2023 10:01:54 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F8723672 for ; Thu, 2 Feb 2023 07:01:50 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id n13so1615788wmr.4 for ; Thu, 02 Feb 2023 07:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jlkw1fMzfUTVbCYC+KtqbnG3D7NE4RNDzj4aOJdcTTk=; b=Hho5VEknzD/I/ybD9eCMzmpRc5S0us958IbJ7J/1fOM/sMv2DQL3iAMA7/kNkhPGjA XcGcRcBo7q8Zrpkv8E0gm/Zl+cWITnUGBosIor6P+Y6RcYQjVhHd8X6QXj5GcEY7juCf oQbdA9+Trz94l2yW9eYsLdiV5ZuZQeSrI70SYnkQZCMt1B816Tl4ICeb/hY8ei+8qQbD ALpl31iaWKT1EMEW/x6OYFtxtPuwuoZzraMSczPesUN7vxHfbFWVqQNIb2+hr9Kq3SMZ NU5W997TUgLLYjZp0dXWufSQi+pp4D5P2ZQ/ydYfENIuicO0zThSp2KYnhkVfuTab/mA bZdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jlkw1fMzfUTVbCYC+KtqbnG3D7NE4RNDzj4aOJdcTTk=; b=pK6tVPKzpFgRY2Dq5o/l48ljzs5ivPVa28oIIREPr5XwFw4PntrepzaDTs0HFn1dhA DVPF4FaSmwV7ukeoHiZAIHG+qN+D4lL16T4rQ2ax2cNazXOmk8rTZuvbz6eYOmyCO0I2 FfQkrsEqfKDw0RtUCHO+ZFJsWOH46MRgMeyrgMTOWRDKPOn/farFjIhmSdHdgRzwnn8B rryLQBZq8dXJzhTfTifcjfWPglY4nJeDavGOPcRRvzTE2bz/36RdJ+rw22KjGM9wJ4l5 tIJ2BnC2qv2JWxvVvNkZBB/Oopvl7MgJJtTYrh2B/Gm3WKTTx7REqNBwhtpuH7bRwN7c Ot1w== X-Gm-Message-State: AO0yUKWDScHcTJMwXYcvmQH/2/tz+cN9ssc0g4Pz8X2VCAQohOD3Bn1l T23sYBpfoT7crrMhHlcXypuX/5srZwRALYQP X-Google-Smtp-Source: AK7set+hOCzRrJzDZKwxlLiUpPd/5jC0lc768lBbKuEI78OyTsoNb0Vd/M4/19caZPBs7ICsW7MVAA== X-Received: by 2002:a05:600c:46ca:b0:3dc:47d4:58d2 with SMTP id q10-20020a05600c46ca00b003dc47d458d2mr6333357wmo.25.1675350108726; Thu, 02 Feb 2023 07:01:48 -0800 (PST) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id p16-20020a05600c469000b003a84375d0d1sm5479060wmo.44.2023.02.02.07.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 07:01:48 -0800 (PST) Date: Thu, 2 Feb 2023 16:01:47 +0100 From: Andrew Jones To: Atish Patra Cc: linux-kernel@vger.kernel.org, Albert Ou , Anup Patel , Atish Patra , Eric Lin , Guo Ren , Heiko Stuebner , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paul Walmsley , Will Deacon Subject: Re: [PATCH v4 03/14] RISC-V: Improve SBI PMU extension related definitions Message-ID: <20230202150147.zcj7s3ezwrg7pqfp@orel> References: <20230201231250.3806412-1-atishp@rivosinc.com> <20230201231250.3806412-4-atishp@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230201231250.3806412-4-atishp@rivosinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 01, 2023 at 03:12:39PM -0800, Atish Patra wrote: > This patch fixes/improve few minor things in SBI PMU extension > definition. > > 1. Align all the firmware event names. > 2. Add macros for bit positions in cache event ID & ops. > > The changes were small enough to combine them together instead > of creating 1 liner patches. > > Signed-off-by: Atish Patra > --- > arch/riscv/include/asm/sbi.h | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h > index 4ca7fba..945b7be 100644 > --- a/arch/riscv/include/asm/sbi.h > +++ b/arch/riscv/include/asm/sbi.h > @@ -169,9 +169,9 @@ enum sbi_pmu_fw_generic_events_t { > SBI_PMU_FW_ILLEGAL_INSN = 4, > SBI_PMU_FW_SET_TIMER = 5, > SBI_PMU_FW_IPI_SENT = 6, > - SBI_PMU_FW_IPI_RECVD = 7, > + SBI_PMU_FW_IPI_RCVD = 7, > SBI_PMU_FW_FENCE_I_SENT = 8, > - SBI_PMU_FW_FENCE_I_RECVD = 9, > + SBI_PMU_FW_FENCE_I_RCVD = 9, > SBI_PMU_FW_SFENCE_VMA_SENT = 10, > SBI_PMU_FW_SFENCE_VMA_RCVD = 11, > SBI_PMU_FW_SFENCE_VMA_ASID_SENT = 12, > @@ -215,6 +215,9 @@ enum sbi_pmu_ctr_type { > #define SBI_PMU_EVENT_CACHE_OP_ID_CODE_MASK 0x06 > #define SBI_PMU_EVENT_CACHE_RESULT_ID_CODE_MASK 0x01 > > +#define SBI_PMU_EVENT_CACHE_ID_SHIFT 3 > +#define SBI_PMU_EVENT_CACHE_OP_SHIFT 1 > + > #define SBI_PMU_EVENT_IDX_INVALID 0xFFFFFFFF > > /* Flags defined for config matching function */ > -- > 2.25.1 > Reviewed-by: Andrew Jones