Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * arch/arm/mach-spear13XX/headsmp.S
0004  *
0005  * Picked from realview
0006  * Copyright (c) 2012 ST Microelectronics Limited
0007  * Shiraz Hashim <shiraz.linux.kernel@gmail.com>
0008  */
0009 
0010 #include <linux/linkage.h>
0011 #include <linux/init.h>
0012 
0013     __INIT
0014 
0015 /*
0016  * spear13xx specific entry point for secondary CPUs. This provides
0017  * a "holding pen" into which all secondary cores are held until we're
0018  * ready for them to initialise.
0019  */
0020 ENTRY(spear13xx_secondary_startup)
0021     mrc p15, 0, r0, c0, c0, 5
0022     and r0, r0, #15
0023     adr r4, 1f
0024     ldmia   r4, {r5, r6}
0025     sub r4, r4, r5
0026     add r6, r6, r4
0027 pen:    ldr r7, [r6]
0028     cmp r7, r0
0029     bne pen
0030 
0031     /* re-enable coherency */
0032     mrc p15, 0, r0, c1, c0, 1
0033     orr r0, r0, #(1 << 6) | (1 << 0)
0034     mcr p15, 0, r0, c1, c0, 1
0035     /*
0036      * we've been released from the holding pen: secondary_stack
0037      * should now contain the SVC stack for this core
0038      */
0039     b   secondary_startup
0040 
0041     .align
0042 1:  .long   .
0043     .long   spear_pen_release
0044 ENDPROC(spear13xx_secondary_startup)