Skip to content

Commit 60dc9db

Browse files
committed
pm: Remove "power state consistency" check
This check is totally wrong, min-residency-us and exit-latency-us are not related to each other at all except that the end of the residency period occurs when the exit starts, so they are totally orthogonal values and should not be checking if one is less than the other or anything like this. Even in the code for the default policy manager, they are added together, so this check is incompatible / in disagreement with that code, so it should be removed. Signed-off-by: Declan Snyder <[email protected]>
1 parent f23c920 commit 60dc9db

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

subsys/pm/state.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,6 @@
1111
BUILD_ASSERT(DT_NODE_EXISTS(DT_PATH(cpus)),
1212
"cpus node not defined in Devicetree");
1313

14-
/**
15-
* Check CPU power state consistency.
16-
*
17-
* @param i Power state index.
18-
* @param node_id CPU node identifier.
19-
*/
20-
#define CHECK_POWER_STATE_CONSISTENCY(i, node_id) \
21-
BUILD_ASSERT( \
22-
DT_PROP_BY_PHANDLE_IDX_OR(node_id, cpu_power_states, i, \
23-
min_residency_us, 0U) >= \
24-
DT_PROP_BY_PHANDLE_IDX_OR(node_id, cpu_power_states, i, \
25-
exit_latency_us, 0U), \
26-
"Found CPU power state with min_residency < exit_latency")
27-
28-
/**
29-
* @brief Check CPU power states consistency
30-
*
31-
* All states should have a minimum residency >= than the exit latency.
32-
*
33-
* @param node_id A CPU node identifier.
34-
*/
35-
#define CHECK_POWER_STATES_CONSISTENCY(node_id) \
36-
LISTIFY(DT_PROP_LEN_OR(node_id, cpu_power_states, 0), \
37-
CHECK_POWER_STATE_CONSISTENCY, (;), node_id); \
38-
39-
/* Check that all power states are consistent */
40-
DT_FOREACH_CHILD(DT_PATH(cpus), CHECK_POWER_STATES_CONSISTENCY)
41-
4214
#define DEFINE_CPU_STATES(n) \
4315
static const struct pm_state_info pmstates_##n[] \
4416
= PM_STATE_INFO_LIST_FROM_DT_CPU(n);

0 commit comments

Comments
 (0)