summaryrefslogtreecommitdiffstats
path: root/arch/metag/kernel/head.S
diff options
context:
space:
mode:
authorJames Hogan2012-10-05 17:56:56 +0200
committerJames Hogan2013-03-02 21:09:51 +0100
commit42682c6c42a5765b2c7cccfca170368fef6191ef (patch)
treeadcfa5e96cd98527ee75fc541efc279357bbe6a2 /arch/metag/kernel/head.S
parentmetag: Basic documentation (diff)
downloadkernel-qcow2-linux-42682c6c42a5765b2c7cccfca170368fef6191ef.tar.gz
kernel-qcow2-linux-42682c6c42a5765b2c7cccfca170368fef6191ef.tar.xz
kernel-qcow2-linux-42682c6c42a5765b2c7cccfca170368fef6191ef.zip
metag: SMP support
Add SMP support for metag. This allows Linux to take control of multiple hardware threads on a single Meta core, treating them as separate Linux CPUs. Signed-off-by: James Hogan <james.hogan@imgtec.com>
Diffstat (limited to 'arch/metag/kernel/head.S')
-rw-r--r--arch/metag/kernel/head.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/metag/kernel/head.S b/arch/metag/kernel/head.S
index 8b1388663892..969dffabc03a 100644
--- a/arch/metag/kernel/head.S
+++ b/arch/metag/kernel/head.S
@@ -43,3 +43,15 @@ __start:
__exit:
XOR TXENABLE,D0Re0,D0Re0
.size __exit,.-__exit
+
+#ifdef CONFIG_SMP
+ .global _secondary_startup
+ .type _secondary_startup,function
+_secondary_startup:
+ MOVT A0StP,#HI(_secondary_data_stack)
+ ADD A0StP,A0StP,#LO(_secondary_data_stack)
+ GETD A0StP,[A0StP]
+ ADD A0StP,A0StP,#THREAD_INFO_SIZE
+ B _secondary_start_kernel
+ .size _secondary_startup,.-_secondary_startup
+#endif