pm: Avoid unnecessary check in SMP
_current_cpu is a macro that expands to an assert that checks if the current context can be migrated to a another cpu. Since this pm_system_suspend() is called from the idle thread (each cpu has its own) and with locked this check is redundant. Just use arch_curr_cpu() to avoid it. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
2cd49ca0fe
commit
f232db4630
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ bool pm_state_force(uint8_t cpu, const struct pm_state_info *info)
|
|||
|
||||
bool pm_system_suspend(int32_t ticks)
|
||||
{
|
||||
uint8_t id = _current_cpu->id;
|
||||
uint8_t id = CURRENT_CPU;
|
||||
k_spinlock_key_t key;
|
||||
|
||||
SYS_PORT_TRACING_FUNC_ENTER(pm, system_suspend, ticks);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue