Skip to content

Commit f2c90b1

Browse files
lukaszluba-armrafaeljw
authored andcommitted
PM: EM: update the comments related to power scale
The Energy Model supports power values expressed in milli-Watts or in an 'abstract scale'. Update the related comments is the code to reflect that state. Reviewed-by: Quentin Perret <qperret@google.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5a64f77 commit f2c90b1

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

include/linux/energy_model.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
/**
1414
* em_perf_state - Performance state of a performance domain
1515
* @frequency: The frequency in KHz, for consistency with CPUFreq
16-
* @power: The power consumed at this level, in milli-watts (by 1 CPU or
17-
by a registered device). It can be a total power: static and
18-
dynamic.
16+
* @power: The power consumed at this level (by 1 CPU or by a registered
17+
* device). It can be a total power: static and dynamic.
1918
* @cost: The cost coefficient associated with this level, used during
2019
* energy calculation. Equal to: power * max_frequency / frequency
2120
*/
@@ -58,7 +57,7 @@ struct em_data_callback {
5857
/**
5958
* active_power() - Provide power at the next performance state of
6059
* a device
61-
* @power : Active power at the performance state in mW
60+
* @power : Active power at the performance state
6261
* (modified)
6362
* @freq : Frequency at the performance state in kHz
6463
* (modified)
@@ -69,8 +68,8 @@ struct em_data_callback {
6968
* and frequency.
7069
*
7170
* In case of CPUs, the power is the one of a single CPU in the domain,
72-
* expressed in milli-watts. It is expected to fit in the
73-
* [0, EM_MAX_POWER] range.
71+
* expressed in milli-Watts or an abstract scale. It is expected to
72+
* fit in the [0, EM_MAX_POWER] range.
7473
*
7574
* Return 0 on success.
7675
*/

kernel/power/energy_model.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static int em_create_perf_table(struct device *dev, struct em_perf_domain *pd,
143143

144144
/*
145145
* The power returned by active_state() is expected to be
146-
* positive, in milli-watts and to fit into 16 bits.
146+
* positive and to fit into 16 bits.
147147
*/
148148
if (!power || power > EM_MAX_POWER) {
149149
dev_err(dev, "EM: invalid power: %lu\n",

0 commit comments

Comments
 (0)