Skip to content

Commit f1f39e6

Browse files
ZhaoxiangJinjhedberg
authored andcommitted
cpu_freq: Avoid redundant cpu_freq_policy_reset()
The current code calls cpu_freq_policy_reset() once within the SMP branch of the cpu_freq_timer_handler function, and then calls it again at the beginning of cpu_freq_next_pstate(). This causes repeated resets of 'pstate_best' and 'num_unprocessed_cpus', which prevents the 'last core' from being reached. The initiating core should perform a reset before broadcasting, and other cores should not reset again. Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent c924d8b commit f1f39e6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

subsys/cpu_freq/cpu_freq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ static void cpu_freq_next_pstate(void)
2828
/* Get next performance state */
2929
const struct pstate *pstate_next;
3030

31-
cpu_freq_policy_reset();
32-
3331
ret = cpu_freq_policy_select_pstate(&pstate_next);
3432
if (ret) {
3533
LOG_ERR("Failed to get pstate: %d", ret);

0 commit comments

Comments
 (0)