transition.S 465 B

123456789101112131415161718192021222324
  1. /*
  2. * (C) Copyright 2013
  3. * David Feng <fenghua@phytium.com.cn>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <asm-offsets.h>
  8. #include <config.h>
  9. #include <version.h>
  10. #include <linux/linkage.h>
  11. #include <asm/macro.h>
  12. ENTRY(armv8_switch_to_el2)
  13. switch_el x0, 1f, 0f, 0f
  14. 0: ret
  15. 1: armv8_switch_to_el2_m x0
  16. ENDPROC(armv8_switch_to_el2)
  17. ENTRY(armv8_switch_to_el1)
  18. switch_el x0, 0f, 1f, 0f
  19. 0: ret
  20. 1: armv8_switch_to_el1_m x0, x1
  21. ENDPROC(armv8_switch_to_el1)