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 <bjarki.andreasen@nordicsemi.no>
This commit is contained in:
Bjarki Arge Andreasen
2025-12-10 19:50:09 +01:00
committed by Fabio Baltieri
parent 239d20af90
commit 7c72e3cc42

View File

@@ -23,6 +23,10 @@ FUNC_NORETURN void sys_reboot(int type)
(void)irq_lock();
#if defined(CONFIG_ZERO_LATENCY_IRQS)
(void)arch_zli_lock();
#endif /* CONFIG_ZERO_LATENCY_IRQS */
/* Disable caches to ensure all data is flushed */
#if defined(CONFIG_ARCH_CACHE)
#if defined(CONFIG_DCACHE)