3 * David Feng <fenghua@phytium.com.cn>
5 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm-offsets.h>
11 #include <linux/linkage.h>
12 #include <asm/macro.h>
14 ENTRY(armv8_switch_to_el2)
15 switch_el x0, 1f, 0f, 0f
17 1: armv8_switch_to_el2_m x0
18 ENDPROC(armv8_switch_to_el2)
20 ENTRY(armv8_switch_to_el1)
21 switch_el x0, 0f, 1f, 0f
23 1: armv8_switch_to_el1_m x0, x1
24 ENDPROC(armv8_switch_to_el1)