PM: EM: Change debugfs configuration to use runtime EM table data
authorLukasz Luba <lukasz.luba@arm.com>
Thu, 8 Feb 2024 11:55:54 +0000 (11:55 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Feb 2024 14:00:32 +0000 (15:00 +0100)
commit09417e673cbd578a1eaf8aba34a668119622d79c
treecea1fec86b15f0974191e9355311a53db7d5a799
parent9f5fb518c3c022c5c50883c9006f6f2cd00d51d7
PM: EM: Change debugfs configuration to use runtime EM table data

Dump the runtime EM table values which can be modified in time. In order
to do that allocate chunk of debug memory which can be later freed
automatically thanks to devm_kcalloc().

This design can handle the fact that the EM table memory can change
after EM update, so debug code cannot use the pointer from initialization
phase.

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