lkml.org 
[lkml]   [2022]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3] arm64: perf: Retain PMCR.X of PMCR_EL0 during reset
On Mon, May 09, 2022 at 10:58:50PM +0530, Srinivasarao Pathipati wrote:
> Preserve the bit PMCR.X of PMCR_EL0 during PMU reset to export
> PMU events. as it could be set before PMU initialization.
>
> Exporting events could result in additional power consumption
> so making it configurable.
>
> Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
> ---
> Changes since V2:
> Done below changes as per Will's comments
> - enabling pmcr_x now configurable with kernel parameters and
> by default it is disabled.
>
> Changes since V1:
> - Preserving only PMCR_X bit as per Robin Murphy's comment.
> ---
> Documentation/admin-guide/kernel-parameters.txt | 4 ++++
> arch/arm64/kernel/perf_event.c | 13 +++++++++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index de3da15..cf3410e 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -5150,6 +5150,10 @@
> Useful for devices that are detected asynchronously
> (e.g. USB and MMC devices).
>
> + retain_pmcr_x
> + [KNL] Retain export bit of PMCR_EL0 that is getting reset
> + during pmu reset.

I think it would be better to build this as a sysctl so that it can be
toggled at runtime as well.

Will

\
 
 \ /
  Last update: 2022-05-10 11:29    [W:0.046 / U:2.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site