headsmp.S 978 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * arch/arm/mach-spear13XX/headsmp.S
  4. *
  5. * Picked from realview
  6. * Copyright (c) 2012 ST Microelectronics Limited
  7. * Shiraz Hashim <[email protected]>
  8. */
  9. #include <linux/linkage.h>
  10. #include <linux/init.h>
  11. __INIT
  12. /*
  13. * spear13xx specific entry point for secondary CPUs. This provides
  14. * a "holding pen" into which all secondary cores are held until we're
  15. * ready for them to initialise.
  16. */
  17. ENTRY(spear13xx_secondary_startup)
  18. mrc p15, 0, r0, c0, c0, 5
  19. and r0, r0, #15
  20. adr r4, 1f
  21. ldmia r4, {r5, r6}
  22. sub r4, r4, r5
  23. add r6, r6, r4
  24. pen: ldr r7, [r6]
  25. cmp r7, r0
  26. bne pen
  27. /* re-enable coherency */
  28. mrc p15, 0, r0, c1, c0, 1
  29. orr r0, r0, #(1 << 6) | (1 << 0)
  30. mcr p15, 0, r0, c1, c0, 1
  31. /*
  32. * we've been released from the holding pen: secondary_stack
  33. * should now contain the SVC stack for this core
  34. */
  35. b secondary_startup
  36. .align
  37. 1: .long .
  38. .long spear_pen_release
  39. ENDPROC(spear13xx_secondary_startup)