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

From: Rafael J. Wysocki (Intel)

Date: Tue Jul 21 2026 - 11:41:07 EST


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?