blob: 253a39bd1137ab7d7b1cc86791ba4289b5ee91af [file] [log] [blame]
David Feng85fd5f12013-12-14 11:47:35 +08001/*
2 * (C) Copyright 2013
3 * David Feng <fenghua@phytium.com.cn>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <asm-offsets.h>
9#include <config.h>
David Feng85fd5f12013-12-14 11:47:35 +080010#include <linux/linkage.h>
11#include <asm/macro.h>
12
13ENTRY(armv8_switch_to_el2)
14 switch_el x0, 1f, 0f, 0f
150: ret
York Sun56cc3db2014-09-08 12:20:00 -0700161: armv8_switch_to_el2_m x0
David Feng85fd5f12013-12-14 11:47:35 +080017ENDPROC(armv8_switch_to_el2)
18
19ENTRY(armv8_switch_to_el1)
20 switch_el x0, 0f, 1f, 0f
210: ret
York Sun56cc3db2014-09-08 12:20:00 -0700221: armv8_switch_to_el1_m x0, x1
David Feng85fd5f12013-12-14 11:47:35 +080023ENDPROC(armv8_switch_to_el1)