PM: EM: Find first CPU active while updating OPP efficiency
authorLukasz Luba <lukasz.luba@arm.com>
Thu, 8 Feb 2024 11:55:37 +0000 (11:55 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Feb 2024 14:00:23 +0000 (15:00 +0100)
commit99907d6054f2d39a625004f9f4e3fe9297838a3c
tree38009504155cd13786fe120b11b2f5d666d9bf8f
parente7b1cc9a7ea6d7862baac0fd7b145573618727dd
PM: EM: Find first CPU active while updating OPP efficiency

The Energy Model might be updated at runtime and the energy efficiency
for each OPP may change. Thus, there is a need to update also the
cpufreq framework and make it aligned to the new values. In order to
do that, use a first active CPU from the Performance Domain. This is
needed since the first CPU in the cpumask might be offline when we
run this code path.

Reviewed-by: Hongyan Xia <hongyan.xia2@arm.com>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/energy_model.c