Skip to content

Commit 512239d

Browse files
committed
PM: EM: Rework the depends on for CONFIG_ENERGY_MODEL
JIRA: https://issues.redhat.com/browse/RHEL-111365 commit 17f0828 Author: Jeson Gao <jeson.gao@unisoc.com> Date: Fri Mar 7 13:23:49 2025 +0000 PM: EM: Rework the depends on for CONFIG_ENERGY_MODEL 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> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 26e91e8 commit 512239d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/powercap/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ config DTPM
6969

7070
config DTPM_CPU
7171
bool "Add CPU power capping based on the energy model"
72-
depends on DTPM && ENERGY_MODEL
72+
depends on DTPM && ENERGY_MODEL && SMP
7373
help
7474
This enables support for CPU power limitation based on
7575
energy model.

kernel/power/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ config CPU_PM
319319

320320
config ENERGY_MODEL
321321
bool "Energy Model for devices with DVFS (CPUs, GPUs, etc)"
322-
depends on SMP
323-
depends on CPU_FREQ
322+
depends on CPU_FREQ || PM_DEVFREQ
324323
help
325324
Several subsystems (thermal and/or the task scheduler for example)
326325
can leverage information about the energy consumed by devices to

0 commit comments

Comments
 (0)