aboutsummaryrefslogtreecommitdiffstats
path: root/arch/c6x/kernel/entry.S
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2012-09-21 12:26:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-01 00:59:08 -0400
commit46f15067c020a0ce712cb2d3ef38c0589a521c15 (patch)
treef980e4faf9dccc1be052fdbbb1dbd785c6238cc6 /arch/c6x/kernel/entry.S
parent61b7fbc3f4ebdcfd34f9438adfab8df936a19e33 (diff)
c6x: add ret_from_kernel_thread(), simplify kernel_thread()
Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/c6x/kernel/entry.S')
-rw-r--r--arch/c6x/kernel/entry.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S
index 30b37e5f4a61..6e6bd9d3d9cc 100644
--- a/arch/c6x/kernel/entry.S
+++ b/arch/c6x/kernel/entry.S
@@ -400,6 +400,26 @@ ret_from_fork_2:
400 STW .D2T2 B0,*+SP(REGS_A4+8) 400 STW .D2T2 B0,*+SP(REGS_A4+8)
401ENDPROC(ret_from_fork) 401ENDPROC(ret_from_fork)
402 402
403ENTRY(ret_from_kernel_thread)
404#ifdef CONFIG_C6X_BIG_KERNEL
405 MVKL .S1 schedule_tail,A0
406 MVKH .S1 schedule_tail,A0
407 B .S2X A0
408#else
409 B .S2 schedule_tail
410#endif
411 LDW .D2T2 *+SP(REGS_A0+8),B10 /* get fn */
412 ADDKPC .S2 0f,B3,3
4130:
414 B .S2 B10 /* call fn */
415 LDW .D2T1 *+SP(REGS_A1+8),A4 /* get arg */
416 MVKL .S2 sys_exit,B11
417 MVKH .S2 sys_exit,B11
418 ADDKPC .S2 0f,B3,1
4190:
420 BNOP .S2 B11,5 /* jump to sys_exit */
421ENDPROC(ret_from_kernel_thread)
422
403 ;; 423 ;;
404 ;; These are the interrupt handlers, responsible for calling __do_IRQ() 424 ;; These are the interrupt handlers, responsible for calling __do_IRQ()
405 ;; int6 is used for syscalls (see _system_call entry) 425 ;; int6 is used for syscalls (see _system_call entry)