]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PM: EM: Fix incorrect description of the cost field in struct em_perf_state
authorYaxiong Tian <tianyaxiong@kylinos.cn>
Tue, 30 Dec 2025 06:15:34 +0000 (14:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:18:36 +0000 (11:18 +0100)
commitc6dc745bba80ebc9f2661accf10ae4dc851bd217
tree30dbc0b4e5e904e952e7c3a2e76aba74591c0f51
parentb0c5a56de1951edef800ae955c3a52367d38999b
PM: EM: Fix incorrect description of the cost field in struct em_perf_state

[ Upstream commit 54b603f2db6b95495bc33a8f2bde80f044baff9a ]

Due to commit 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove
division"), the logic for energy consumption calculation has been modified.
The actual calculation of cost is 10 * power * max_frequency / frequency
instead of power * max_frequency / frequency.

Therefore, the comment for cost has been updated to reflect the correct
content.

Fixes: 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division")
Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
[ rjw: Added Fixes: tag ]
Link: https://patch.msgid.link/20251230061534.816894-1-tianyaxiong@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/energy_model.h