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 8C78EC61DA4 for ; Thu, 9 Mar 2023 22:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbjCIWPO (ORCPT ); Thu, 9 Mar 2023 17:15:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbjCIWPK (ORCPT ); Thu, 9 Mar 2023 17:15:10 -0500 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAECCF7EFD for ; Thu, 9 Mar 2023 14:15:09 -0800 (PST) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-176b48a9a05so3965099fac.0 for ; Thu, 09 Mar 2023 14:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678400109; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=E3PQRMfxQpWw1EQQGErwxaTj11IIxbXvdV9zBZ1y4E8=; b=Y9RgqY/R49EUCbBlDxx4d3nanzjLIn3mMjcmuVW56VS1awQnqsRW+zJP5wohesNJch zg1I7QVEFGP6FlohW41/rXg+b2cqCqxW6BLcDDqbions+nu/IonS5GIGWuNYbKlP6sDn oVGM/BN6Ky7XOdJqN7qcl4WRWFaF2rNx+y8u4LFkVEZgP6KG5MuemD7Fq3jcVwU4/x4o L362NHXei92hxGxrvgWRqVPrz/7Z6PdwujtF/h61LOOfYglO5eZ/jds+x4zP6cSm65Ad j0P5ccYOf4x/JJvz+FgB/NknLjbaQ9B4plsCKGR1KiZQQ/JKJaXsWE2h40V4WldgmCEy 4sBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678400109; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E3PQRMfxQpWw1EQQGErwxaTj11IIxbXvdV9zBZ1y4E8=; b=OA4b3pC/58moXIR+M4ExW/WTkogvrsMe54AXbPV7CpoRWMcN70Dzx5an2RyfYn92O+ U0lVKxgtwFURnGnYLFvbrId8utKqtMY0riHRaZRcc0toanoIjIxAup2/7stzvgB4zSTO iYJbkDrqg6nIDnYTW0KQMK48+fq5AhWyKi2QBoopnWXsb2NoiTDuilboeC1302nRqKAH sj39CP+/baW5LrrX0OyAPkT6r6lLFBaVHuyioyP8Bxo79jtbKmD4ozo2Ze9oHI3WNl4R hP9m+t+LFAGsSpzOuXSV6osqVSQqxdH7KlhS5kux8mBN64AmYOYYAm2hssmKTUwMFHyG GX8g== X-Gm-Message-State: AO0yUKWdOS4s0F/3tPexhAldycWBdFBjNc+fta6S7380GzNTtn9XEsax ffLDy3HcxqAZIm0ZpshMGJpeXaPhfUevX1wsBHjnqw== X-Google-Smtp-Source: AK7set/32BBIrvEDt0fltBRnip4rqPQdBgJQQDjXpdLAI3JvJVq6nj0esM2VH3efuTnhloEU4dl5EHGiLl6+aSSX9Ec= X-Received: by 2002:a05:6870:a2c2:b0:176:4a71:6fdc with SMTP id w2-20020a056870a2c200b001764a716fdcmr8314733oak.9.1678400109081; Thu, 09 Mar 2023 14:15:09 -0800 (PST) MIME-Version: 1.0 References: <20230215010717.3612794-1-rananta@google.com> <20230215010717.3612794-7-rananta@google.com> In-Reply-To: From: Raghavendra Rao Ananta Date: Thu, 9 Mar 2023 14:14:58 -0800 Message-ID: Subject: Re: [REPOST PATCH 06/16] tools: arm64: perf_event: Define Cycle counter enable/overflow bits To: Reiji Watanabe Cc: Oliver Upton , Marc Zyngier , Ricardo Koller , James Morse , Suzuki K Poulose , Paolo Bonzini , Jing Zhang , Colton Lewis , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Reiji, On Thu, Mar 2, 2023 at 4:47=E2=80=AFPM Reiji Watanabe w= rote: > > Hi Raghu, > > On Tue, Feb 14, 2023 at 5:07=E2=80=AFPM Raghavendra Rao Ananta > wrote: > > > > Add the definitions of ARMV8_PMU_CNTOVS_C (Cycle counter overflow > > bit) for overflow status registers and ARMV8_PMU_CNTENSET_C (Cycle > > counter enable bit) for PMCNTENSET_EL0 register. > > > > Signed-off-by: Raghavendra Rao Ananta > > --- > > tools/arch/arm64/include/asm/perf_event.h | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/tools/arch/arm64/include/asm/perf_event.h b/tools/arch/arm= 64/include/asm/perf_event.h > > index 97e49a4d4969f..8ce23aabf6fe6 100644 > > --- a/tools/arch/arm64/include/asm/perf_event.h > > +++ b/tools/arch/arm64/include/asm/perf_event.h > > @@ -222,9 +222,11 @@ > > /* > > * PMOVSR: counters overflow flag status reg > > */ > > +#define ARMV8_PMU_CNTOVS_C (1 << 31) /* Cycle counter overflow bi= t */ > > Nit: This macro doesn't seem to be used in any of the patches. > Do we need this ? > Ah, I think originally I intended to use this instead of defining my own ARMV8_PMU_CYCLE_COUNTER_IDX to align with other pmc idx-es. But I think the latter is better. I'll remove ARMV8_PMU_CNTOVS_C. Thank you. Raghavendra > Thank you, > Reiji > > > > #define ARMV8_PMU_OVSR_MASK 0xffffffff /* Mask= for writable bits */ > > #define ARMV8_PMU_OVERFLOWED_MASK ARMV8_PMU_OVSR_MASK > > > > + > > /* > > * PMXEVTYPER: Event selection reg > > */ > > @@ -247,6 +249,11 @@ > > #define ARMV8_PMU_USERENR_CR (1 << 2) /* Cycle counter can be read a= t EL0 */ > > #define ARMV8_PMU_USERENR_ER (1 << 3) /* Event counter can be read a= t EL0 */ > > > > +/* > > + * PMCNTENSET: Count Enable set reg > > + */ > > +#define ARMV8_PMU_CNTENSET_C (1 << 31) /* Cycle counter enable bit = */ > > + > > /* PMMIR_EL1.SLOTS mask */ > > #define ARMV8_PMU_SLOTS_MASK 0xff > > > > -- > > 2.39.1.581.gbfd45094c4-goog > >