aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/kernel/head.S')
-rw-r--r--arch/arc/kernel/head.S33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S
index e63f6a43abb1..006dec3fc353 100644
--- a/arch/arc/kernel/head.S
+++ b/arch/arc/kernel/head.S
@@ -27,6 +27,15 @@ stext:
27 ; Don't clobber r0-r4 yet. It might have bootloader provided info 27 ; Don't clobber r0-r4 yet. It might have bootloader provided info
28 ;------------------------------------------------------------------- 28 ;-------------------------------------------------------------------
29 29
30#ifdef CONFIG_SMP
31 ; Only Boot (Master) proceeds. Others wait in platform dependent way
32 ; IDENTITY Reg [ 3 2 1 0 ]
33 ; (cpu-id) ^^^ => Zero for UP ARC700
34 ; => #Core-ID if SMP (Master 0)
35 GET_CPU_ID r5
36 cmp r5, 0
37 jnz arc_platform_smp_wait_to_boot
38#endif
30 ; Clear BSS before updating any globals 39 ; Clear BSS before updating any globals
31 ; XXX: use ZOL here 40 ; XXX: use ZOL here
32 mov r5, __bss_start 41 mov r5, __bss_start
@@ -76,3 +85,27 @@ stext:
76 GET_TSK_STACK_BASE r9, sp ; r9 = tsk, sp = stack base(output) 85 GET_TSK_STACK_BASE r9, sp ; r9 = tsk, sp = stack base(output)
77 86
78 j start_kernel ; "C" entry point 87 j start_kernel ; "C" entry point
88
89#ifdef CONFIG_SMP
90;----------------------------------------------------------------
91; First lines of code run by secondary before jumping to 'C'
92;----------------------------------------------------------------
93 .section .init.text, "ax",@progbits
94 .type first_lines_of_secondary, @function
95 .globl first_lines_of_secondary
96
97first_lines_of_secondary:
98
99 ; setup per-cpu idle task as "current" on this CPU
100 ld r0, [@secondary_idle_tsk]
101 SET_CURR_TASK_ON_CPU r0, r1
102
103 ; setup stack (fp, sp)
104 mov fp, 0
105
106 ; set it's stack base to tsk->thread_info bottom
107 GET_TSK_STACK_BASE r0, sp
108
109 j start_kernel_secondary
110
111#endif