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

"Rafael J. Wysocki (Intel)" <[email protected]> Tue, 21 Jul 2026 17:34:10 +0200
Newsgroups dev.linux.lists.acpica-devel,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.kernel.vger.linux-tegra
Message-ID <CAJZ5v0jGJ8HDjmnKP8HvPRqm6NKL1mzxd6=z-xDyxe6=SoNCCA@mail.gmail.com>
On Fri, Jul 17, 2026 at 5:47=E2=80=AFAM zhenglifeng (A) <zhenglifeng1@huawe=
i.com> 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 u=
64
> > signature so the autonomous selection register fits alongside the other=
s.
> >
> > Suggested-by: Pierre Gondois <[email protected]>
> > Signed-off-by: Sumit Gupta <[email protected]>
>
> If this is necessary, I think it is better to just change the input param=
eter
> 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?