Skip to content

Commit 66dbe43

Browse files
bjarki-andreasenfabiobaltieri
authored andcommitted
lib: os: poweroff: Disable ZLIs before poweroff
We currently only disable "normal" IRQs with irq_lock(). This is not sufficient if ZLIs are enabled, as even though they are supposed to be "above" the kernel, they must not interrupt the poweroff procedure. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 7c72e3c commit 66dbe43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/os/poweroff.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ void sys_poweroff(void)
1010
{
1111
(void)irq_lock();
1212

13+
#if defined(CONFIG_ZERO_LATENCY_IRQS)
14+
(void)arch_zli_lock();
15+
#endif /* CONFIG_ZERO_LATENCY_IRQS */
16+
1317
z_sys_poweroff();
1418
}

0 commit comments

Comments
 (0)