headsmp.S 814 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2011 Freescale Semiconductor, Inc.
  3. * Copyright 2011 Linaro Ltd.
  4. *
  5. * The code contained herein is licensed under the GNU General Public
  6. * License. You may obtain a copy of the GNU General Public License
  7. * Version 2 or later at the following locations:
  8. *
  9. * http://www.opensource.org/licenses/gpl-license.html
  10. * http://www.gnu.org/copyleft/gpl.html
  11. */
  12. #include <linux/linkage.h>
  13. #include <linux/init.h>
  14. #include <asm/assembler.h>
  15. diag_reg_offset:
  16. .word g_diag_reg - .
  17. .macro set_diag_reg
  18. adr r0, diag_reg_offset
  19. ldr r1, [r0]
  20. add r1, r1, r0 @ r1 = physical &g_diag_reg
  21. ldr r0, [r1]
  22. mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register
  23. .endm
  24. ENTRY(v7_secondary_startup)
  25. ARM_BE8(setend be) @ go BE8 if entered LE
  26. set_diag_reg
  27. b secondary_startup
  28. ENDPROC(v7_secondary_startup)