summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/head.S
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2017-01-12 23:30:29 +0100
committerVineet Gupta <vgupta@synopsys.com>2017-01-24 20:12:28 +0100
commitbf02454a741b58682a82c314a9a46bed930ed2f7 (patch)
tree4175b5ba0876a3bbbbd243ccdf692b46e5365025 /arch/arc/kernel/head.S
parentARCv2: MCIP: update the BCR per current changes (diff)
downloadlinux-bf02454a741b58682a82c314a9a46bed930ed2f7.tar.xz
linux-bf02454a741b58682a82c314a9a46bed930ed2f7.zip
ARC: smp-boot: Decouple Non masters waiting API from jump to entry point
For run-on-reset SMP configs, non master cores call a routine which waits until Master gives it a "go" signal (currently using a shared mem flag). The same routine then jumps off the well known entry point of all non Master cores i.e. @first_lines_of_secondary This patch moves out the last part into one single place in early boot code. This is better in terms of absraction (the wait API only waits) and returns, leaving out the "jump off to" part. In actual implementation this requires some restructuring of the early boot code as well as Master now jumps to BSS setup explicitly, vs. falling thru into it before. Technically this patch doesn't cause any functional change, it just moves the ugly #ifdef'ry from assembly code to "C" Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/head.S')
-rw-r--r--arch/arc/kernel/head.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S
index 689dd867fdff..8b90d25a15cc 100644
--- a/arch/arc/kernel/head.S
+++ b/arch/arc/kernel/head.S
@@ -71,14 +71,14 @@ ENTRY(stext)
GET_CPU_ID r5
cmp r5, 0
mov.nz r0, r5
-#ifdef CONFIG_ARC_SMP_HALT_ON_RESET
- ; Non-Master can proceed as system would be booted sufficiently
- jnz first_lines_of_secondary
-#else
+ bz .Lmaster_proceed
+
; Non-Masters wait for Master to boot enough and bring them up
- jnz arc_platform_smp_wait_to_boot
-#endif
- ; Master falls thru
+ ; when they resume, tail-call to entry point
+ mov blink, @first_lines_of_secondary
+ j arc_platform_smp_wait_to_boot
+
+.Lmaster_proceed:
#endif
; Clear BSS before updating any globals