From: "Badole, Vishal" <vishal.badole@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
ray.huang@amd.com, rafael@kernel.org, viresh.kumar@linaro.org,
perry.yuan@amd.com, kprateek.nayak@amd.com, hansg@kernel.org,
ilpo.jarvinen@linux.intel.com,
platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Krishnamoorthi M <krishnamoorthi.m@amd.com>
Subject: Re: [PATCH 2/2] platform/x86/amd: hfi: Stand down when amd-pstate CAS is active
Date: Mon, 23 Nov 2026 16:18:33 +0530 [thread overview]
Message-ID: <69481084-2af7-4156-aeba-3c883a644f1a@amd.com> (raw)
In-Reply-To: <804443a9-b50c-4d22-bded-8c3d908ace08@amd.com>
On 11/15/2026 7:52 PM, Mario Limonciello wrote:
>
>
> On 11/15/26 08:16, Mario Limonciello wrote:
>>
>>
>> On 11/14/26 09:03, Vishal Badole wrote:
>>> From: Krishnamoorthi M <krishnamoorthi.m@amd.com>
>>>
>>> When amd-pstate CAS is active, it takes ownership of per-CPU capacity
>>> values that the scheduler uses to distinguish performance and efficiency
>>> cores. amd-hfi manages the same scheduler state through its ranking
>>> mechanism. Running both simultaneously would cause them to overwrite
>>> each other's settings, leading to unpredictable task placement on hybrid
>>> platforms.
>>>
>>> Avoid loading amd-hfi if CAS is enabled.
>>>
>>> Signed-off-by: Krishnamoorthi M <krishnamoorthi.m@amd.com>
>>
>> When a patch is authored by another person and you send it on their
>> behalf you need to add your own S-o-b as well.
>>
>> Think of it like a chain of custody.
>>
>>> ---
>>> drivers/platform/x86/amd/hfi/hfi.c | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/drivers/platform/x86/amd/hfi/hfi.c b/drivers/platform/
>>> x86/amd/hfi/hfi.c
>>> index 86a7f4332c35..b6878614e2bc 100644
>>> --- a/drivers/platform/x86/amd/hfi/hfi.c
>>> +++ b/drivers/platform/x86/amd/hfi/hfi.c
>>> @@ -29,6 +29,8 @@
>>> #include <asm/cpu_device_id.h>
>>> +#include <linux/amd-pstate.h>
>>> +
>>> #include <acpi/pcc.h>
>>> #include <acpi/cppc_acpi.h>
>>> @@ -536,6 +538,12 @@ static int __init amd_hfi_init(void)
>>> !cpu_feature_enabled(X86_FEATURE_AMD_WORKLOAD_CLASS))
>>> return -ENODEV;
>>> + /* amd-pstate CAS owns heterogeneous core scheduling when
>>> enabled. */
>>> + if (amd_pstate_cas_active()) {
>>> + pr_debug("amd-pstate CAS is active, not loading amd-hfi\n");
>>> + return -ENODEV;
>>> + }
>>> +
>
> The load order happens to work; but AFAICT this is just by coincidence
> (link order).
>
> If the link order was changed in the future this could break completely
> non-obviously.
>
> I think it would be most ideal to add deferred probing support or
> forcing HFI into a later init call phase.
>
Ack! I will add required changes to deffer the HFI driver probing.
>>> ret = platform_driver_register(&amd_hfi_driver);
>>> if (ret)
>>> pr_err("failed to register HFI driver\n");
>>
>
next prev parent reply other threads:[~2026-11-23 10:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 15:03 [PATCH 0/2] cpufreq: amd-pstate: Capacity Aware Scheduling on hybrid platforms Vishal Badole
2026-11-14 15:03 ` [PATCH 1/2] cpufreq: amd-pstate: Set asymmetric CPU capacity " Vishal Badole
2026-11-15 15:54 ` Mario Limonciello
2026-11-23 10:45 ` Badole, Vishal
2026-11-17 6:19 ` K Prateek Nayak
2026-11-23 11:45 ` Badole, Vishal
2026-11-14 15:03 ` [PATCH 2/2] platform/x86/amd: hfi: Stand down when amd-pstate CAS is active Vishal Badole
2026-11-15 14:16 ` Mario Limonciello
2026-11-15 14:22 ` Mario Limonciello
2026-11-23 10:48 ` Badole, Vishal [this message]
2026-11-23 10:46 ` Badole, Vishal
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=69481084-2af7-4156-aeba-3c883a644f1a@amd.com \
--to=vishal.badole@amd.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kprateek.nayak@amd.com \
--cc=krishnamoorthi.m@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perry.yuan@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=viresh.kumar@linaro.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
all inboxes | Powered by JetHome®