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

Sumit Gupta <[email protected]> Fri, 24 Jul 2026 00:58:02 +0530
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 <[email protected]>
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) <[email protected]> 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 <[email protected]>
>>> Signed-off-by: Sumit Gupta <[email protected]>
>> 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