ldp x24, x25, [sp, #16 * 12]
ldp x26, x27, [sp, #16 * 13]
ldp x28, x29, [sp, #16 * 14]
-
- .if \el == 0
-alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0
ldr lr, [sp, #S_LR]
#ifdef CONFIG_AMLOGIC_VMAP
/* restore context sp and per-cpu vmap stack */
.endif
#endif /* CONFIG_AMLOGIC_VMAP */
add sp, sp, #S_FRAME_SIZE // restore sp
- eret
-alternative_else_nop_endif
+
+ .if \el == 0
+alternative_insn eret, nop, ARM64_UNMAP_KERNEL_AT_EL0
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
bne 4f
- msr far_el1, x29
+ msr far_el1, x30
tramp_alias x30, tramp_exit_native, x29
br x30
4:
br x30
#endif
.else
- ldr lr, [sp, #S_LR]
- add sp, sp, #S_FRAME_SIZE // restore sp
eret
.endif
.endm
ldr x30, [x30, x29]
msr vbar_el1, x30
- ldr lr, [sp, #S_LR]
- tramp_unmap_kernel x29
+ tramp_unmap_kernel x30
.if \regsize == 64
- mrs x29, far_el1
+ mrs x30, far_el1
.endif
- add sp, sp, #S_FRAME_SIZE // restore sp
eret
.endm