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

Sumit Gupta <[email protected]>
Newsgroups gmane.linux.ports.tegra,gmane.linux.kernel,gmane.linux.power-management.general,gmane.linux.acpi.devel
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.