aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-12-15 06:03:39 -0500
committerVineet Gupta <vgupta@synopsys.com>2015-02-02 06:38:37 -0500
commit98edfab4c10343bd3ba1ca47d000544b9f964886 (patch)
tree7a7199204acacf79b6e5b933926a1bc3f73f5067
parent4c86231c14a8a1e9838dcb013ded07ebd2f2a1a5 (diff)
ARC: add some more comments to ret_from_fork
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/kernel/entry.S14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
index 83a046a7cd06..d868289c5a26 100644
--- a/arch/arc/kernel/entry.S
+++ b/arch/arc/kernel/entry.S
@@ -736,16 +736,20 @@ ENTRY(ret_from_fork)
736 ; put last task in scheduler queue 736 ; put last task in scheduler queue
737 bl @schedule_tail 737 bl @schedule_tail
738 738
739 ; If kernel thread, jump to its entry-point
740 ld r9, [sp, PT_status32] 739 ld r9, [sp, PT_status32]
741 brne r9, 0, 1f 740 brne r9, 0, 1f
742 741
743 jl.d [r14] 742 jl.d [r14] ; kernel thread entry point
744 mov r0, r13 ; arg to payload 743 mov r0, r13 ; (see PF_KTHREAD block in copy_thread)
745 744
7461: 7451:
747 ; special case of kernel_thread entry point returning back due to 746 ; Return to user space
748 ; kernel_execve() - pretend return from syscall to ret to userland 747 ; 1. Any forked task (Reach here via BRne above)
748 ; 2. First ever init task (Reach here via return from JL above)
749 ; This is the historic "kernel_execve" use-case, to return to init
750 ; user mode, in a round about way since that is always done from
751 ; a kernel thread which is executed via JL above but always returns
752 ; out whenever kernel_execve (now inline do_fork()) is involved
749 b ret_from_exception 753 b ret_from_exception
750END(ret_from_fork) 754END(ret_from_fork)
751 755