summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh5
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-14 01:41:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-22 22:31:01 -0400
commit7147e215480323bb2617fcebf585c447188ff760 (patch)
treefb5d92e4f9e2f4d5d5c8e4449c4ef43e05275826 /arch/sh/kernel/cpu/sh5
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
downloadop-kernel-dev-7147e215480323bb2617fcebf585c447188ff760.zip
op-kernel-dev-7147e215480323bb2617fcebf585c447188ff760.tar.gz
sh: switch to generic kernel_thread()/kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sh/kernel/cpu/sh5')
-rw-r--r--arch/sh/kernel/cpu/sh5/entry.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S
index 7e605b9..0c8d037 100644
--- a/arch/sh/kernel/cpu/sh5/entry.S
+++ b/arch/sh/kernel/cpu/sh5/entry.S
@@ -1228,6 +1228,25 @@ ret_from_fork:
pta ret_from_syscall, tr0
blink tr0, ZERO
+.global ret_from_kernel_thread
+ret_from_kernel_thread:
+
+ movi schedule_tail,r5
+ ori r5, 1, r5
+ ptabs r5, tr0
+ blink tr0, LINK
+
+ ld.q SP, FRAME_R(2), r2
+ ld.q SP, FRAME_R(3), r3
+ ptabs r3, tr0
+ blink tr0, LINK
+
+ ld.q SP, FRAME_S(FSPC), r2
+ addi r2, 4, r2 /* Move PC, being pre-execution event */
+ st.q SP, FRAME_S(FSPC), r2
+ pta ret_from_syscall, tr0
+ blink tr0, ZERO
+
syscall_allowed:
/* Use LINK to deflect the exit point, default is syscall_ret */
pta syscall_ret, tr0
OpenPOWER on IntegriCloud