David Feng | 85fd5f1 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 1 | /* |
| 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 Feng | 85fd5f1 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 10 | #include <linux/linkage.h> |
| 11 | #include <asm/macro.h> |
| 12 | |
| 13 | ENTRY(armv8_switch_to_el2) |
| 14 | switch_el x0, 1f, 0f, 0f |
| 15 | 0: ret |
York Sun | 56cc3db | 2014-09-08 12:20:00 -0700 | [diff] [blame] | 16 | 1: armv8_switch_to_el2_m x0 |
David Feng | 85fd5f1 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 17 | ENDPROC(armv8_switch_to_el2) |
| 18 | |
| 19 | ENTRY(armv8_switch_to_el1) |
| 20 | switch_el x0, 0f, 1f, 0f |
| 21 | 0: ret |
York Sun | 56cc3db | 2014-09-08 12:20:00 -0700 | [diff] [blame] | 22 | 1: armv8_switch_to_el1_m x0, x1 |
David Feng | 85fd5f1 | 2013-12-14 11:47:35 +0800 | [diff] [blame] | 23 | ENDPROC(armv8_switch_to_el1) |