[PATCH v1 48/54] ARM: don't disable MMU when EFI booting

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Dec 18 02:38:08 PST 2025


EFI boot does not disable MMU or caches and Linux will log errors if we
disable them. Therefore selectively, skip MMU disablement.

This may give us some performance boost when we slim down the support
for direct EFI-stub boot.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 arch/arm/cpu/cpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c
index 0c678f54c023..eb9a2310534f 100644
--- a/arch/arm/cpu/cpu.c
+++ b/arch/arm/cpu/cpu.c
@@ -90,6 +90,9 @@ static void arch_shutdown(void)
 
 	disable_interrupts();
 
+	if (efi_is_loader() == EFI_LOADER_RUNTIME)
+		return;
+
 	mmu_disable();
 
 	icache_invalidate();
-- 
2.47.3




More information about the barebox mailing list