Re: [PATCH v2] cpufreq/amd-pstate: Add POWER_SUPPLY select for dynamic EPP

From: Rafael J. Wysocki

Date: Tue Apr 07 2026 - 16:12:48 EST


On Tue, Apr 7, 2026 at 9:50 PM Mario Limonciello
<mario.limonciello@xxxxxxx> 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 selects.
>
> Suggested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> Fixes: e30ca6dd5345 ("cpufreq/amd-pstate: Add dynamic energy performance preference")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604040742.ySEdkuAa-lkp@xxxxxxxxx/
> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> ---
> v2:
> * Use Prateek's suggestion
>
> drivers/cpufreq/Kconfig.x86 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
> index 53e2702e6f1c..7cd156b5e0fc 100644
> --- a/drivers/cpufreq/Kconfig.x86
> +++ b/drivers/cpufreq/Kconfig.x86
> @@ -41,6 +41,7 @@ config X86_AMD_PSTATE
> select ACPI_CPPC_LIB if X86_64
> select CPU_FREQ_GOV_SCHEDUTIL if SMP
> select ACPI_PLATFORM_PROFILE
> + select POWER_SUPPLY
> help
> This driver adds a CPUFreq driver which utilizes a fine grain
> processor performance frequency control range instead of legacy
> --

Applied (instead of the previous version), thanks!