From: Marc Zyngier <maz@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI
Date: Mon, 28 Nov 2022 08:28:43 +0000 [thread overview]
Message-ID: <86pmd7mqis.wl-maz@kernel.org> (raw)
In-Reply-To: <60767243-2f3e-a7aa-06e1-674e43f18e9c@arm.com>
On Mon, 28 Nov 2022 03:06:15 +0000,
Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>
>
>
> On 11/28/22 08:24, Anshuman Khandual wrote:
> > __armv8pmu_probe_pmu() returns if detected PMU is either not implemented or
> > implementation defined. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is
> > not implemented is '0' which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI
> > defined as '0b0000'.
> >
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Will Deacon <will@kernel.org>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: linux-perf-users@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> > ---
> > This applies on v6.1-rc6
> >
> > arch/arm64/kernel/perf_event.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
> > index 85a3aaefc0fb..b638f584b4dd 100644
> > --- a/arch/arm64/kernel/perf_event.c
> > +++ b/arch/arm64/kernel/perf_event.c
> > @@ -1188,7 +1188,8 @@ static void __armv8pmu_probe_pmu(void *info)
> > dfr0 = read_sysreg(id_aa64dfr0_el1);
> > pmuver = cpuid_feature_extract_unsigned_field(dfr0,
> > ID_AA64DFR0_EL1_PMUVer_SHIFT);
> > - if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF || pmuver == 0)
> > + if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF ||
> > + pmuver == ID_AA64DFR0_EL1_PMUVer_NI)
> > return;
> >
> > cpu_pmu->pmuver = pmuver;
> > --
>
> + Marc Zyngier <maz@kernel.org>
>
> There are some KVM related pmuver not-implemented check as well, should they be
> replaced in this patch or rather in a separate patch ?
>
> arch/arm64/kvm/pmu-emul.c: if (pmu->pmuver == 0 || pmu->pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF)
> arch/arm64/kvm/pmu-emul.c: if (pmu->pmuver == 0 ||
> arch/arm64/kvm/pmu-emul.c: pmu->pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF)
Separate patch please, as I have a large KVM PMU rework already
queued.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI
Date: Mon, 28 Nov 2022 08:28:43 +0000 [thread overview]
Message-ID: <86pmd7mqis.wl-maz@kernel.org> (raw)
In-Reply-To: <60767243-2f3e-a7aa-06e1-674e43f18e9c@arm.com>
On Mon, 28 Nov 2022 03:06:15 +0000,
Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>
>
>
> On 11/28/22 08:24, Anshuman Khandual wrote:
> > __armv8pmu_probe_pmu() returns if detected PMU is either not implemented or
> > implementation defined. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is
> > not implemented is '0' which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI
> > defined as '0b0000'.
> >
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Will Deacon <will@kernel.org>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: linux-perf-users@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> > ---
> > This applies on v6.1-rc6
> >
> > arch/arm64/kernel/perf_event.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
> > index 85a3aaefc0fb..b638f584b4dd 100644
> > --- a/arch/arm64/kernel/perf_event.c
> > +++ b/arch/arm64/kernel/perf_event.c
> > @@ -1188,7 +1188,8 @@ static void __armv8pmu_probe_pmu(void *info)
> > dfr0 = read_sysreg(id_aa64dfr0_el1);
> > pmuver = cpuid_feature_extract_unsigned_field(dfr0,
> > ID_AA64DFR0_EL1_PMUVer_SHIFT);
> > - if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF || pmuver == 0)
> > + if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF ||
> > + pmuver == ID_AA64DFR0_EL1_PMUVer_NI)
> > return;
> >
> > cpu_pmu->pmuver = pmuver;
> > --
>
> + Marc Zyngier <maz@kernel.org>
>
> There are some KVM related pmuver not-implemented check as well, should they be
> replaced in this patch or rather in a separate patch ?
>
> arch/arm64/kvm/pmu-emul.c: if (pmu->pmuver == 0 || pmu->pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF)
> arch/arm64/kvm/pmu-emul.c: if (pmu->pmuver == 0 ||
> arch/arm64/kvm/pmu-emul.c: pmu->pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF)
Separate patch please, as I have a large KVM PMU rework already
queued.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-28 8:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 2:54 [PATCH] arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI Anshuman Khandual
2022-11-28 2:54 ` Anshuman Khandual
2022-11-28 3:06 ` Anshuman Khandual
2022-11-28 3:06 ` Anshuman Khandual
2022-11-28 8:28 ` Marc Zyngier [this message]
2022-11-28 8:28 ` Marc Zyngier
2022-11-28 12:06 ` Mark Rutland
2022-11-28 12:06 ` Mark Rutland
2022-11-29 19:52 ` Will Deacon
2022-11-29 19:52 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86pmd7mqis.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=acme@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.