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 x0, 1f, 0f, 0f
16 1: armv8_switch_to_el2_m x0
17 ENDPROC(armv8_switch_to_el2)
19 ENTRY(armv8_switch_to_el1)
20 switch_el x0, 0f, 1f, 0f
22 1: armv8_switch_to_el1_m x0, x1
23 ENDPROC(armv8_switch_to_el1)