Skip to content

Commit 01f492b

Browse files
sigvartmhmbolivar-nordic
authored andcommitted
[nrf fromlist] boot: zephyr: Fix misaligned #else for irq_lock
So in PR #1089 I misaligned the `#else` used for the `irq_lock` as it should be aligned with `CONFIG_MCUBOOT_CLEANUP_ARM_CORE`. So that `irq_lock`is called when we don't call `__disable_irq` from arm core clean up code. Signed-off-by: Sigvart Hovland <[email protected]> (cherry picked from commit 150219a)
1 parent 36e619f commit 01f492b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

boot/zephyr/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ static void do_boot(struct boot_rsp *rsp)
233233

234234
#if CONFIG_CPU_HAS_ARM_MPU || CONFIG_CPU_HAS_NXP_MPU
235235
z_arm_clear_arm_mpu_config();
236-
#else
237-
irq_lock();
238236
#endif
239237

240238
#if defined(CONFIG_BUILTIN_STACK_GUARD) && \
@@ -246,6 +244,8 @@ static void do_boot(struct boot_rsp *rsp)
246244
__set_MSPLIM(0);
247245
#endif
248246

247+
#else
248+
irq_lock();
249249
#endif /* CONFIG_MCUBOOT_CLEANUP_ARM_CORE */
250250

251251
#ifdef CONFIG_BOOT_INTR_VEC_RELOC

0 commit comments

Comments
 (0)