[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <445d4b9039daca40a4d937959a0bc48ffe347f7f.camel@perches.com>
Date: Tue, 11 Aug 2020 11:19:42 -0700
From: Joe Perches <joe@...ches.com>
To: Zhang Rui <rui.zhang@...el.com>, peterz@...radead.org,
mingo@...hat.com, acme@...nel.org
Cc: linux-pm@...r.kernel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, linux-kernel@...r.kernel.org,
kan.liang@...ux.intel.com, len.brown@...el.com, rafael@...nel.org
Subject: Re: [PATCH v2 2/3] perf/x86/rapl: Support multiple rapl unit quirks
On Tue, 2020-08-11 at 23:31 +0800, Zhang Rui wrote:
> There will be more platforms with different fixed energy units.
> Enhance the code to support different rapl unit quirks for different
> platforms.
This seems like one quirk per platform.
Should multiple quirks on individual platforms be supported?
> diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
[]
> @@ -130,11 +130,16 @@ struct rapl_pmus {
> struct rapl_pmu *pmus[];
> };
>
> +enum rapl_unit_quirk {
> + RAPL_UNIT_QUIRK_NONE,
> + RAPL_UNIT_QUIRK_INTEL_HSW,
> +};
> +
> struct rapl_model {
> struct perf_msr *rapl_msrs;
> unsigned long events;
> unsigned int msr_power_unit;
> - bool apply_quirk;
> + enum rapl_unit_quirk unit_quirk;
> };
Powered by blists - more mailing lists