public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP
@ 2026-04-07 14:54 Mario Limonciello
  2026-04-07 17:07 ` Rafael J. Wysocki
  2026-04-07 17:08 ` K Prateek Nayak
  0 siblings, 2 replies; 4+ messages in thread
From: Mario Limonciello @ 2026-04-07 14:54 UTC (permalink / raw)
  To: K Prateek Nayak
  Cc: Perry Yuan, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:CPU FREQUENCY SCALING FRAMEWORK, Mario Limonciello,
	kernel test robot

The dynamic EPP feature uses power_supply_reg_notifier() and
power_supply_unreg_notifier() but doesn't declare a dependency on
POWER_SUPPLY, causing linker errors when POWER_SUPPLY is not enabled.

Add POWER_SUPPLY to the depends line to fix the build issue.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604040742.ySEdkuAa-lkp@intel.com/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/cpufreq/Kconfig.x86 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index a0dbb9808ae9..53e2702e6f1c 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -71,7 +71,7 @@ config X86_AMD_PSTATE_DEFAULT_MODE
 
 config X86_AMD_PSTATE_DYNAMIC_EPP
 	bool "AMD Processor P-State dynamic EPP support"
-	depends on X86_AMD_PSTATE
+	depends on X86_AMD_PSTATE && POWER_SUPPLY
 	default n
 	help
 	  Allow the kernel to dynamically change the energy performance
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP
  2026-04-07 14:54 [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP Mario Limonciello
@ 2026-04-07 17:07 ` Rafael J. Wysocki
  2026-04-07 17:08 ` K Prateek Nayak
  1 sibling, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2026-04-07 17:07 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: K Prateek Nayak, Perry Yuan,
	open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:CPU FREQUENCY SCALING FRAMEWORK, kernel test robot

On Tue, Apr 7, 2026 at 4:55 PM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> The dynamic EPP feature uses power_supply_reg_notifier() and
> power_supply_unreg_notifier() but doesn't declare a dependency on
> POWER_SUPPLY, causing linker errors when POWER_SUPPLY is not enabled.
>
> Add POWER_SUPPLY to the depends line to fix the build issue.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604040742.ySEdkuAa-lkp@intel.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/cpufreq/Kconfig.x86 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
> index a0dbb9808ae9..53e2702e6f1c 100644
> --- a/drivers/cpufreq/Kconfig.x86
> +++ b/drivers/cpufreq/Kconfig.x86
> @@ -71,7 +71,7 @@ config X86_AMD_PSTATE_DEFAULT_MODE
>
>  config X86_AMD_PSTATE_DYNAMIC_EPP
>         bool "AMD Processor P-State dynamic EPP support"
> -       depends on X86_AMD_PSTATE
> +       depends on X86_AMD_PSTATE && POWER_SUPPLY
>         default n
>         help
>           Allow the kernel to dynamically change the energy performance
> --

Applied, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP
  2026-04-07 14:54 [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP Mario Limonciello
  2026-04-07 17:07 ` Rafael J. Wysocki
@ 2026-04-07 17:08 ` K Prateek Nayak
  2026-04-07 17:09   ` Mario Limonciello
  1 sibling, 1 reply; 4+ messages in thread
From: K Prateek Nayak @ 2026-04-07 17:08 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Perry Yuan, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:CPU FREQUENCY SCALING FRAMEWORK, kernel test robot

Hello Mario,

On 4/7/2026 8:24 PM, Mario Limonciello wrote:
>  config X86_AMD_PSTATE_DYNAMIC_EPP
>  	bool "AMD Processor P-State dynamic EPP support"
> -	depends on X86_AMD_PSTATE
> +	depends on X86_AMD_PSTATE && POWER_SUPPLY

This config only controls the default selection right? The offending
power_supply_{reg,unreg}_notifier() isn't guarded behind
#ifdef CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP so we'll still run into this.

I thing X86_AMD_PSTATE doing a "select POWER_SUPPLY" should cure this.
Thoughts?

>  	default n
>  	help
>  	  Allow the kernel to dynamically change the energy performance

-- 
Thanks and Regards,
Prateek


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP
  2026-04-07 17:08 ` K Prateek Nayak
@ 2026-04-07 17:09   ` Mario Limonciello
  0 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2026-04-07 17:09 UTC (permalink / raw)
  To: K Prateek Nayak
  Cc: Perry Yuan, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:CPU FREQUENCY SCALING FRAMEWORK, kernel test robot



On 4/7/26 12:08, K Prateek Nayak wrote:
> Hello Mario,
> 
> On 4/7/2026 8:24 PM, Mario Limonciello wrote:
>>   config X86_AMD_PSTATE_DYNAMIC_EPP
>>   	bool "AMD Processor P-State dynamic EPP support"
>> -	depends on X86_AMD_PSTATE
>> +	depends on X86_AMD_PSTATE && POWER_SUPPLY
> 
> This config only controls the default selection right? The offending
> power_supply_{reg,unreg}_notifier() isn't guarded behind
> #ifdef CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP so we'll still run into this.
> 
> I thing X86_AMD_PSTATE doing a "select POWER_SUPPLY" should cure this.
> Thoughts?
> 

Oh that's a really good point, thanks.  I'll send another patch as a 
follow up.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-07 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 14:54 [PATCH] cpufreq/amd-pstate: Add POWER_SUPPLY dependency for dynamic EPP Mario Limonciello
2026-04-07 17:07 ` Rafael J. Wysocki
2026-04-07 17:08 ` K Prateek Nayak
2026-04-07 17:09   ` Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox