]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PM: EM: Rework the depends on for CONFIG_ENERGY_MODEL
authorJeson Gao <jeson.gao@unisoc.com>
Fri, 7 Mar 2025 13:23:49 +0000 (13:23 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Mar 2025 14:23:46 +0000 (15:23 +0100)
Now not only CPUs can use energy efficiency models, but GPUs
can also use. On the other hand, even with only one CPU, we can also
use energy_model to align control in thermal.
So remove the dependence of SMP, and add the DEVFREQ.

Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
[Added missing SMP config option in DTPM_CPU dependency]
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20250307132649.4056210-1-lukasz.luba@arm.com
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/Kconfig
kernel/power/Kconfig

index 69ef8d081c98bd50f142d8bae3ddd36d1d1200cf..03c4c796d99313b795aee7116f2cfd35a26702c2 100644 (file)
@@ -82,7 +82,7 @@ config DTPM
 
 config DTPM_CPU
        bool "Add CPU power capping based on the energy model"
-       depends on DTPM && ENERGY_MODEL
+       depends on DTPM && ENERGY_MODEL && SMP
        help
          This enables support for CPU power limitation based on
          energy model.
index ca947ed32e3ddb9b05bbe3cdfbc37109280f64dc..54a6236800194a274743337b9d49d409fbc211ef 100644 (file)
@@ -380,8 +380,7 @@ config CPU_PM
 
 config ENERGY_MODEL
        bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
-       depends on SMP
-       depends on CPU_FREQ
+       depends on CPU_FREQ || PM_DEVFREQ
        help
          Several subsystems (thermal and/or the task scheduler for example)
          can leverage information about the energy consumed by devices to