Re: [PATCH v2 2/3] ACPI: CPPC: Add u64 wrappers for the autonomous selection register

From: Sumit Gupta

Date: Thu Jul 23 2026 - 15:32:46 EST



On 21/07/26 21:04, Rafael J. Wysocki (Intel) wrote:
External email: Use caution opening links or attachments


On Fri, Jul 17, 2026 at 5:47 AM zhenglifeng (A) <zhenglifeng1@xxxxxxxxxx> wrote:
On 7/16/2026 11:38 PM, Sumit Gupta wrote:
cppc_get_auto_sel()/cppc_set_auto_sel() use a bool, unlike the other
CPPC register get/set helpers which use a u64.

The next patch in this series saves and restores the OSPM-set registers
across CPU hotplug using a common table of get/set helpers typed as
int (*)(int, u64 *) and int (*)(int, u64), which the bool autonomous
selection helpers do not fit.

Add cppc_get_auto_sel_u64()/cppc_set_auto_sel_u64() wrappers with the u64
signature so the autonomous selection register fits alongside the others.

Suggested-by: Pierre Gondois <pierre.gondois@xxxxxxx>
Signed-off-by: Sumit Gupta <sumitg@xxxxxxxxxx>
If this is necessary, I think it is better to just change the input parameter
of the original cppc_get/set_auto_sel() to u64.
Agreed.

Sumit, why don't you just make cppc_get_auto_sel()/cppc_set_auto_sel()
take a u64 argument

Yes, that makes sense. I originally added the wrappers to avoid changing
the existing interface, but updating them directly is cleaner.

In v3, I’ll drop the wrappers and change cppc_get/set_auto_sel() to take
a u64 directly, updating all callers accordingly.

Regards,
Sumit Gupta