[RFC PATCH 5/8] arm64: head: populate page tables before disabling the MMU

Ard Biesheuvel ardb at kernel.org
Fri Mar 4 09:56:54 PST 2022


Reorder the call to init_kernel_el() with the creation of the page
tables so the latter code runs with MMU and caches enabled if that is
how we entered.

Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
---
 arch/arm64/kernel/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index b82c86fc9141..6041078df62a 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -93,9 +93,9 @@ SYM_CODE_START(primary_entry)
 	bl	record_mmu_state
 	bl	record_kaslr_offset
 	bl	preserve_boot_args
+	bl	__create_page_tables
 	bl	init_kernel_el			// w0=cpu_boot_mode
 	bl	set_cpu_boot_mode_flag
-	bl	__create_page_tables
 	/*
 	 * The following calls CPU setup code, see arch/arm64/mm/proc.S for
 	 * details.
-- 
2.30.2




More information about the linux-arm-kernel mailing list