Re: [PATCH v3 05/12] amd-pstate: Add support for CPPC_REQ2 and FLOOR_PERF

From: K Prateek Nayak

Date: Wed Mar 25 2026 - 00:10:08 EST


Hello Mario,

On 3/25/2026 3:08 AM, Mario Limonciello wrote:
>>    * @nominal_freq: the frequency (in khz) that mapped to nominal_perf
>> @@ -87,10 +90,13 @@ struct amd_cpudata {
>>         struct    freq_qos_request req[2];
>>       u64    cppc_req_cached;
>> +    u64    cppc_req2_cached;
>>         union perf_cached perf;
>>         u8    prefcore_ranking;
>> +    u8    floor_perf_cnt;
>> +    u8    bios_floor_perf;
>
> It looks like you forgot to update doc for bios_floor_perf

"bios_floor_perf" is an internal detail that caches the initial state of
"FloorPerf" from CPPC_REQ2 when the driver is loaded.

It is only used to restore the FloorPerf to the original when the CPU is
offlined, the driver unloaded, or when the CPU is suspended. This
essentially resets the state of the CPU to what it was at the boot so a
kexec, driver switch can start off afresh from the BIOS defaults.

User can read amd_pstate_floor_freq just after the boot to know what the
default is. Do we really need to expose this?

>
>>       u32    min_limit_freq;
>>       u32    max_limit_freq;
>>       u32    nominal_freq;
>

--
Thanks and Regards,
Prateek