[PATCH v4 06/45] x86: Tidy up EFI code in interrupt_init()
Simon Glass
sjg at chromium.org
Mon Jun 19 13:59:21 CEST 2023
The ll_boot_init() check handles the EFI case so we don't need the rest
of the code. Drop it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
arch/x86/cpu/i386/interrupt.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index fae2544c456f..f3f3527237f2 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -266,6 +266,10 @@ int interrupt_init(void)
struct udevice *dev;
int ret;
+ /*
+ * When running as an EFI application we are not in control of
+ * interrupts and should leave them alone.
+ */
if (!ll_boot_init())
return 0;
@@ -274,11 +278,6 @@ int interrupt_init(void)
if (ret && ret != -ENODEV)
return ret;
- /*
- * When running as an EFI application we are not in control of
- * interrupts and should leave them alone.
- */
-#ifndef CONFIG_EFI_APP
/* Just in case... */
disable_interrupts();
@@ -294,14 +293,8 @@ int interrupt_init(void)
/* Initialize core interrupt and exception functionality of CPU */
cpu_init_interrupts();
- /*
- * It is now safe to enable interrupts.
- *
- * TODO(sjg at chromium.org): But we don't handle these correctly when
- * booted from EFI.
- */
+ /* It is now safe to enable interrupts */
enable_interrupts();
-#endif
return 0;
}
--
2.41.0.162.gfafddb0af9-goog
More information about the U-Boot
mailing list