PM: EM: Introduce em_dev_update_perf_domain() for EM updates
authorLukasz Luba <lukasz.luba@arm.com>
Thu, 8 Feb 2024 11:55:45 +0000 (11:55 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Feb 2024 14:00:30 +0000 (15:00 +0100)
commit977230d5d50314f9920d3ee6348773d8babbfb58
tree547f238716210bdba51ec21b63c0c8fa58803c24
parentffcf9bce7af02a21fb73738999de1e3d4fde5aca
PM: EM: Introduce em_dev_update_perf_domain() for EM updates

Add API function em_dev_update_perf_domain() which allows the EM to be
changed safely.

Concurrent updaters are serialized with a mutex and the removal of memory
that will not be used any more is carried out with the help of RCU.

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>
include/linux/energy_model.h
kernel/power/energy_model.c