intel_adsp/cavs: power: Fix INTLEVEL value
In pm_state_set we can't just call k_cpu_idle() because this will clear out PS.INTLEVEL. Use k_cpu_atomic_idle instead since Zephyr's expect interruptions to be locked after pm_state_set. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
ff43667497
commit
3e5a593de9
1 changed files with 7 additions and 1 deletions
|
@ -163,7 +163,7 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
|
|||
/* do power down - this function won't return */
|
||||
power_down_cavs(true, uncache_to_cache(&hpsram_mask[0]));
|
||||
} else {
|
||||
k_cpu_idle();
|
||||
k_cpu_atomic_idle(arch_irq_lock());
|
||||
}
|
||||
} else {
|
||||
__ASSERT(false, "invalid argument - unsupported power state");
|
||||
|
@ -183,6 +183,12 @@ void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id)
|
|||
} else {
|
||||
__ASSERT(false, "invalid argument - unsupported power state");
|
||||
}
|
||||
|
||||
/**
|
||||
* We don't have the key used to lock interruptions here.
|
||||
* Just set PS.INTLEVEL to 0.
|
||||
*/
|
||||
__asm__ volatile ("rsil a2, 0");
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue