[PATCH] LoongArch: Align the address of kernel_entry to 4KB
From: Huacai Chen
Date: Tue Sep 27 2022 - 00:58:39 EST
Align the address of kernel_entry to 4KB, to avoid early tlb miss
exception in case the entry code crosses page boundary.
Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
---
arch/loongarch/kernel/head.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.S
index 8f89f39fd31b..7e57ae8741b1 100644
--- a/arch/loongarch/kernel/head.S
+++ b/arch/loongarch/kernel/head.S
@@ -34,6 +34,8 @@ SYM_DATA(kernel_offset, .long kernel_offset - _text);
__REF
+ .align 12
+
SYM_CODE_START(kernel_entry) # kernel entry point
/* Config direct window and set PG */
--
2.31.1