
From: Simon Glass <sjg@chromium.org> Move disabling of interrupts to bootm_final() so it is done for bootm and EFI boot paths. Drop the now-duplicate calls. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/bootm.c | 1 - boot/bootm_final.c | 2 ++ cmd/booti.c | 6 ------ lib/efi_loader/efi_boottime.c | 4 +--- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index 3fef6506e91..0e15cdd0015 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -1067,7 +1067,6 @@ int bootm_run_states(struct bootm_info *bmi, int states) /* Load the OS */ if (!ret && (states & BOOTM_STATE_LOADOS)) { - bootm_disable_interrupts(); if (IS_ENABLED(CONFIG_EVENT)) { struct event_os_load data; diff --git a/boot/bootm_final.c b/boot/bootm_final.c index 466bb55debe..5a3be11841e 100644 --- a/boot/bootm_final.c +++ b/boot/bootm_final.c @@ -38,6 +38,8 @@ void bootm_final(enum bootm_final_t flags) */ dm_remove_devices_active(); + bootm_disable_interrupts(); + if (!(flags & BOOTM_FINAL_NO_CLEANUP)) cleanup_before_linux(); } diff --git a/cmd/booti.c b/cmd/booti.c index f4f782da056..c1a61e4752d 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -124,12 +124,6 @@ int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (booti_start(&bmi)) return 1; - /* - * We are doing the BOOTM_STATE_LOADOS state ourselves, so must - * disable interrupts ourselves - */ - bootm_disable_interrupts(); - images.os.os = IH_OS_LINUX; if (IS_ENABLED(CONFIG_RISCV_SMODE)) images.os.arch = IH_ARCH_RISCV; diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 6cf430da766..cc711a5c52f 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -2228,10 +2228,8 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, list_del(&evt->link); } - if (!efi_st_keep_devices) { - bootm_disable_interrupts(); + if (!efi_st_keep_devices) bootm_final(BOOTM_FINAL_NO_CLEANUP); - } /* Patch out unsupported runtime function */ efi_runtime_detach(); -- 2.43.0