From: Chen Lu <181250012@smail.nju.edu.cn> Date: Mon, 18 Oct 2021 05:22:38 +0000 (+0800) Subject: riscv: fix misalgned trap vector base address X-Git-Tag: v5.15~5^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64a19591a2938b170aa736443d5d3bf4c51e1388;p=thirdparty%2Flinux.git riscv: fix misalgned trap vector base address The trap vector marked by label .Lsecondary_park must align on a 4-byte boundary, as the {m,s}tvec is defined to require 4-byte alignment. Signed-off-by: Chen Lu <181250012@smail.nju.edu.cn> Reviewed-by: Anup Patel Fixes: e011995e826f ("RISC-V: Move relocate and few other functions out of __init") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index fce5184b22c34..52c5ff9804c55 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -193,6 +193,7 @@ setup_trap_vector: csrw CSR_SCRATCH, zero ret +.align 2 .Lsecondary_park: /* We lack SMP support or have too many harts, so park this hart */ wfi