Re: [PATCH v5] cpufreq: cppc: mask Desired_Excursion when autonomous selection is enabled
From: Viresh Kumar
Date: Wed May 20 2026 - 04:33:57 EST
On 15-05-26, 10:42, Xueqin Luo wrote:
> According to the ACPI 6.6 specification, the Desired_Excursion field is not
> utilized when autonomous selection is enabled. In this mode, the bit is
> architecturally ignored and does not carry meaningful information.
>
> Currently, the kernel exposes the raw Performance Limited register
> value to userspace through the cpufreq sysfs interface. This may lead to
> misinterpretation, as userspace may assume Desired_Excursion is valid
> even when autonomous selection is active.
>
> To provide a stable and semantically correct ABI, mask out the
> Desired_Excursion bit when autonomous selection is enabled, so that
> userspace does not observe undefined or misleading values.
>
> Writes are left unchanged, as the field is architecturally ignored in
> this mode and write attempts are harmless.
>
> Signed-off-by: Xueqin Luo <luoxueqin@xxxxxxxxxx>
> Reviewed-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> Reviewed-by: Sumit Gupta <sumitg@xxxxxxxxxx>
> ---
> v4 -> v5 :
> - Return -EINVAL instead of success when cpufreq policy is
> unavailable, addressing Sumit Gupta's review comments.
> ---
> drivers/cpufreq/cppc_cpufreq.c | 29 ++++++++++++++++++++++++++++-
> 1 file changed, 28 insertions(+), 1 deletion(-)
Applied. Thanks.
--
viresh