RE: [PATCH v2 10/21] cpufreq: amd: add amd-pstate checking support check attribute

From: Huang, Ray
Date: Thu Oct 14 2021 - 06:26:23 EST


[AMD Official Use Only]

> -----Original Message-----
> From: Fontenot, Nathan <Nathan.Fontenot@xxxxxxx>
> Sent: Wednesday, September 29, 2021 5:24 AM
> To: Huang, Ray <Ray.Huang@xxxxxxx>; Rafael J . Wysocki
> <rafael.j.wysocki@xxxxxxxxx>; Viresh Kumar <viresh.kumar@xxxxxxxxxx>;
> Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>; Borislav Petkov <bp@xxxxxxx>;
> Peter Zijlstra <peterz@xxxxxxxxxxxxx>; Ingo Molnar <mingo@xxxxxxxxxx>;
> linux-pm@xxxxxxxxxxxxxxx
> Cc: Sharma, Deepak <Deepak.Sharma@xxxxxxx>; Deucher, Alexander
> <Alexander.Deucher@xxxxxxx>; Limonciello, Mario
> <Mario.Limonciello@xxxxxxx>; Su, Jinzhou (Joe) <Jinzhou.Su@xxxxxxx>;
> Du, Xiaojian <Xiaojian.Du@xxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx;
> x86@xxxxxxxxxx
> Subject: Re: [PATCH v2 10/21] cpufreq: amd: add amd-pstate checking
> support check attribute
>
> On 9/26/2021 4:05 AM, Huang Rui wrote:
> > The amd-pstate hardware support check will be needed by cpupower to
> know
> > whether amd-pstate is enabled and supported.
> >
>
> Is this needed?
>
> If acpi_cpc_valid() is false, then the amd_pstate driver would not have been
> loaded (see patch 5/21, module init routine will return -ENODEV). If this
> driver isn't loaded then this sysfs file won't get created.
>
> Shouldn't the cpupower command just check the scaling_driver in sysfs to
> see
> if it's amd_pstate?
>

Make sense, thanks! Will update it in V3.

Thanks,
Ray