From: Mario Limonciello <mario.limonciello@amd.com>
To: "Rafael J. Wysocki (Intel)" <rafael@kernel.org>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, x86@kernel.org,
Vishal Badole <Vishal.Badole@amd.com>
Subject: Re: [PATCH 1/3] ACPI: CPPC: Refactor boost ratio handling
Date: Tue, 1 Sep 2026 11:44:24 -0500 [thread overview]
Message-ID: <202252ca-4456-461c-9097-2e66d79d3a71@amd.com> (raw)
In-Reply-To: <CAJZ5v0ipHi6DFbd=kCnJvxQ4qzsdANHou6uAPXbhFxUrLpdmuw@mail.gmail.com>
On 9/1/26 11:34, Rafael J. Wysocki (Intel) wrote:
> On Tue, Sep 1, 2026 at 5:28 PM Mario Limonciello
> <mario.limonciello@amd.com> wrote:
>>
>>
>>
>> On 9/1/26 04:31, K Prateek Nayak wrote:
>>> On 9/1/2026 1:14 AM, Mario Limonciello wrote:
>>>> +int amd_get_max_frequency(unsigned int cpu)
>>>> +{
>>>> + enum x86_topology_cpu_type type = cpu_data(cpu).topo.cpu_type;
>>>> + const struct x86_cpu_id *id = x86_match_cpu(amd_zen6_client_ids);
>>>> + const struct amd_max_freq *max_freq;
>>>> +
>>>> + if (!id)
>>>> + return -ENODEV;
>>>> +
>>>> + max_freq = (const struct amd_max_freq *)id->driver_data;
>>>> +
>>>> + switch (type) {
>>>> + case TOPO_CPU_TYPE_PERFORMANCE:
>>>> + return max_freq->performance;
>>>> + case TOPO_CPU_TYPE_EFFICIENCY:
>>>> + return max_freq->efficiency;
>>>> + case TOPO_CPU_TYPE_LOW_POWER:
>>>> + return max_freq->low_power;
>>>> + default:
>>>> + break;
>>>> + }
>>>> +
>>>> + return -EINVAL;
>>>
>>> nit. Since we don't really propagate the error codes returned
>>> by amd_get_max_frequency(), maybe we can return 0 instead of
>>> -ENODEV, -EINVAL and the callers can simply do:
>>>
>>> max_freq = amd_get_max_frequency(cpu);
>>> if (!max_freq)
>>> max_freq = /* Fallback */;
>>>
>>> similar to get_max_boost_ratio() pattern. No strong feelings
>>> either way.
>>>
>>
>> OK. Will adjust for next version.
>>
>>>> +}
>>>> +EXPORT_SYMBOL_GPL(amd_get_max_frequency);
>
> Please note though that all CPPC-related material is gated on this patch series:
>
> https://lore.kernel.org/linux-acpi/20260830115644.2056983-1-christian.loehle@arm.com/
>
> and there are other multiple series already waiting.
>
> That queue needs to be flushed I'm afraid.
Thanks, I'll rebase and test on that series.
I was just CC'ed into it today too.
next prev parent reply other threads:[~2026-09-01 16:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 19:44 [PATCH 0/3] Zen6 client CPPC Mario Limonciello
2026-08-31 19:44 ` [PATCH 1/3] ACPI: CPPC: Refactor boost ratio handling Mario Limonciello
2026-09-01 4:41 ` K Prateek Nayak
2026-09-01 15:26 ` Mario Limonciello
2026-09-01 9:31 ` K Prateek Nayak
2026-09-01 15:28 ` Mario Limonciello
2026-09-01 16:34 ` Rafael J. Wysocki (Intel)
2026-09-01 16:44 ` Mario Limonciello [this message]
2026-08-31 19:44 ` [PATCH 2/3] cpufreq/acpi-cpufreq: Use amd_get_boost_ratio() Mario Limonciello
2026-08-31 19:44 ` [PATCH 3/3] cpufreq/amd-pstate: Get Highest Freq for a CPU Mario Limonciello
2026-09-01 9:36 ` [PATCH 0/3] Zen6 client CPPC K Prateek Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202252ca-4456-461c-9097-2e66d79d3a71@amd.com \
--to=mario.limonciello@amd.com \
--cc=Vishal.Badole@amd.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox