PM: EM: Add functions for memory allocations for new EM tables
authorLukasz Luba <lukasz.luba@arm.com>
Thu, 8 Feb 2024 11:55:44 +0000 (11:55 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Feb 2024 14:00:30 +0000 (15:00 +0100)
commitffcf9bce7af02a21fb73738999de1e3d4fde5aca
tree41a4e27831b0f0033a2909b1fbe472cfb81df5f3
parentaa11a7ebfd5d698f541641922beede1cb474bf70
PM: EM: Add functions for memory allocations for new EM tables

The runtime modified EM table can be provided from drivers. Create
mechanism which allows safely allocate and free the table for device
drivers. The same table can be used by the EAS in task scheduler code
paths, so make sure the memory is not freed when the device driver module
is unloaded.

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