Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2014299rwb; Thu, 29 Sep 2022 05:17:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6lHQIJzL5+x8o7sSofRTu9TOZ0SzqJSXTs+OOO2Epk2d8Sklcd6I6L7mSVUj4KIhyNX3xC X-Received: by 2002:a17:907:7f0e:b0:783:93a3:791f with SMTP id qf14-20020a1709077f0e00b0078393a3791fmr2453461ejc.59.1664453859941; Thu, 29 Sep 2022 05:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664453859; cv=none; d=google.com; s=arc-20160816; b=qr4+KWll9LzgUM8nvcd68cirliHA4DGOgJrFzYcP4U+QpLsL0wdv6hoMpX41E0ySlq O00yqpXSRtFGGFfxMIKgLpfM2IOekI2OxqBX8v73oiUFuWvQEdtcnu3QpI4mWEC0FKRE Zl42hX3fCkeVeRAytVvdcrlSVuOpWantnEGSxiHySW5auWwXB7Yt8bLJ76O+xnNAxLqY x5HATolNT1TSaQnUFkYgVWZts/z3D4+5fikcNtFakJkbxDOIz44ZtY4I6V6wU3cNAW1v 2smLnG7wEMl7LnKyiQw8C6rFIXZYvp4BjVySOshQDS7yhrjZyc2nYMlzD4I8J9fZltcz Nj0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9wuD+MMQkWlkU92xEXZuH2XBJLdQHWKQSbeumomScS8=; b=zdqSzERxIc5enMXPcXDCX4DC9E6zOVZC6CXz8nQmRVHJn+RZgnwY52p5BtrOShnGHD K8866wBJbzC5XVUwaqEUo8hEshoS/U0GZhEpfyxV3w8dWAu8vzmP2zBPF1K7DkcwpaH6 KoUwEWCzGfmduFCfpAZMdH76abk2pyrFNAHaIMlt4ggjaflHe+mW/1FeEIC7oKd3XRRZ Tylpp3PtUN1SqHSL1vE7eeMiAhOVEYX2nJBysWBP2vTWDrSYw0mNxHuMCBipWussAMNg tePjtYO4VgGVoGZ0vPZrk42EAPZ+HVHgQH9BrgkMQyO81Xky34zcCfBie/68CuCWVHlx ruNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nBS3qMl5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di20-20020a170906731400b007835897050asi9888645ejc.83.2022.09.29.05.17.13; Thu, 29 Sep 2022 05:17:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nBS3qMl5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235231AbiI2L3v (ORCPT + 99 others); Thu, 29 Sep 2022 07:29:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234289AbiI2L3s (ORCPT ); Thu, 29 Sep 2022 07:29:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C221F9DA; Thu, 29 Sep 2022 04:29:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 634C9B8246E; Thu, 29 Sep 2022 11:29:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8B0FC433C1; Thu, 29 Sep 2022 11:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664450984; bh=l123fFiBTIIG4boLDnbP/+WIQ9sZsWaaiSayKBcLVOU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nBS3qMl5DfZttE6IC6rRN5KGZ8vZ+D5sS1bFYD4+5l/bmW/OUaI6+y255j/KAtizm /3juX6wMkr6lljUrivGbGHyzd7h+DrSuYwclOfGbYxmxj6os/44ZBOKosBVMgKGnJe SyJ1S7Lv9uFsUugR2xyIhXU0cv6SOuHJBLWWwNMdrgeS2wAVtwUYlghGrUdLb3XUkO +gI0eOY8/MhgmEC9sGl5IxQEPo/aV4E31suHK/zxqZJglhSSyIG6yvaynPkdpCauPj 6melQBWdqOEUVtPr/2vVwszdGvEsmd/FtnfQM/OXNuHIIkbtXrMfL/Ltj8Y3nR2FQZ x5JSEIJKkMoPw== Date: Thu, 29 Sep 2022 12:29:38 +0100 From: Mark Brown To: Anshuman Khandual Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, peterz@infradead.org, acme@kernel.org, mark.rutland@arm.com, will@kernel.org, catalin.marinas@arm.com, Marc Zyngier Subject: Re: [PATCH V3 1/7] arm64/perf: Add BRBE registers and fields Message-ID: References: <20220929075857.158358-1-anshuman.khandual@arm.com> <20220929075857.158358-2-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+2mhFxwV4YkUyQZR" Content-Disposition: inline In-Reply-To: <20220929075857.158358-2-anshuman.khandual@arm.com> X-Cookie: Last week's pet, this week's special. X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --+2mhFxwV4YkUyQZR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 29, 2022 at 01:28:51PM +0530, Anshuman Khandual wrote: Thanks for doing this work - I did spot a few small issues though. > /* id_aa64dfr0 */ > +#define ID_AA64DFR0_BRBE_SHIFT 52 > #define ID_AA64DFR0_MTPMU_SHIFT 48 > #define ID_AA64DFR0_TRBE_SHIFT 44 > #define ID_AA64DFR0_TRACE_FILT_SHIFT 40 > @@ -848,6 +952,9 @@ > #define ID_AA64DFR0_PMSVER_8_2 0x1 > #define ID_AA64DFR0_PMSVER_8_3 0x2 > =20 > +#define ID_AA64DFR0_BRBE 0x1 > +#define ID_AA64DFR0_BRBE_V1P1 0x2 > + > #define ID_DFR0_PERFMON_SHIFT 24 > =20 > #define ID_DFR0_PERFMON_8_0 0x3 This is already done in -next as a result of ID_AA64DFR0_EL1 being converted, the enumberation define comes out as ID_AA64DFR0_EL1_BRBE_BRBE_V1P1. > +# This is just a dummy register declaration to get all common field mask= s and > +# shifts for accessing given BRBINF contents. > +Sysreg BRBINF_EL1 2 1 8 0 0 > +Res0 63:47 > +Field 46 CCU > +Field 45:32 CC > +Res0 31:18 > +Field 17 LASTFAILED > +Field 16 TX According to DDI0487I.a bit 16 is called T not TX. > +Res0 15:14 > +Enum 13:8 TYPE It's probably worth noting in the comment the issue with Enums here that's meaning you're not using a SysregFields - I'm not sure what people will think of this but providing a definition using the ID for the 0th register does seem expedient. > +Enum 7:6 EL > + 0b00 EL0 > + 0b01 EL1 > + 0b10 EL2 > +EndEnum According to DDI0487I.a 0b11 has the value EL3 (when FEAT_BRBEv1p1). > +Sysreg BRBCR_EL1 2 1 9 0 0 > +Res0 63:24 > +Field 23 EXCEPTION > +Field 22 ERTN > +Res0 21:9 > +Field 8 FZP > +Field 7 ZERO According to DDI0487I.a bit 7 is Res0. > +Field 2 ZERO1 According to DDI0487I.a bit 2 is Res0. > +Sysreg BRBFCR_EL1 2 1 9 0 1 > +Field 16 ENL Accoding to DDI0487I.a this is EnI (ie, an L not an I). > +Sysreg BRBINFINJ_EL1 2 1 9 1 0 > +Field 16 TX According to DDI0487I.a this is T not TX. > +Enum 7:6 EL > + 0b00 EL0 > + 0b01 EL1 > + 0b10 EL2 > +EndEnum According to DDI0487I.a 0b11 has the value EL3 (when FEAT_BRBEv1p1). --+2mhFxwV4YkUyQZR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmM1gaEACgkQJNaLcl1U h9AzPQf/dKcgs3a4B6Rec99BaeLxdCQFO3kmp8lU70mA29eD1BiGJGeLYm3D1Xzw +624rLJnWzTq9pWuVSrjwHCWFqy5VvgznRFGBj8gDw0HrWfVlg3kEJKcnidZob2q vX9m4OywI+r2UgwYDzwqDPysfQF98uBTRnaYvJkPGrWVQv+wfkVikvue8J11nx7J POxF0yrVxS+AiwXhJqnS093X5EItOpcf13/f51bToSOaAuTETn2fpO04QfB/+S5y w3bapIibWTUVr17fEgLpQiRL6k20Jy9iS2/jnzkW2JzmdpKDANVAiDD4UqeYIDa9 TTP8FGWTPKgLsn88f91bWIc8S3aSZQ== =KmN6 -----END PGP SIGNATURE----- --+2mhFxwV4YkUyQZR--