3 * David Feng <fenghua@phytium.com.cn>
5 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm-offsets.h>
10 #include <linux/linkage.h>
11 #include <asm/macro.h>
13 ENTRY(armv8_switch_to_el2)
14 switch_el x5, 1f, 0f, 0f
17 * x3 is kernel entry point or switch_to_el1
18 * if CONFIG_ARMV8_SWITCH_TO_EL1 is defined.
19 * When running in EL2 now, jump to the
20 * address saved in x3.
23 1: armv8_switch_to_el2_m x3, x4, x5
24 ENDPROC(armv8_switch_to_el2)
26 ENTRY(armv8_switch_to_el1)
27 switch_el x5, 0f, 1f, 0f
29 /* x3 is kernel entry point. When running in EL1
30 * now, jump to the address saved in x3.
33 1: armv8_switch_to_el1_m x3, x4, x5
34 ENDPROC(armv8_switch_to_el1)