Skip to content

Commit 7c72e3c

Browse files
bjarki-andreasenfabiobaltieri
authored andcommitted
lib: os: reboot: Disable ZLIs before reboot
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 reboot procedure. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 239d20a commit 7c72e3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/os/reboot.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ FUNC_NORETURN void sys_reboot(int type)
2323

2424
(void)irq_lock();
2525

26+
#if defined(CONFIG_ZERO_LATENCY_IRQS)
27+
(void)arch_zli_lock();
28+
#endif /* CONFIG_ZERO_LATENCY_IRQS */
29+
2630
/* Disable caches to ensure all data is flushed */
2731
#if defined(CONFIG_ARCH_CACHE)
2832
#if defined(CONFIG_DCACHE)

0 commit comments

Comments
 (0)