From 8f54bcacbc39f883bde2210cf2754e5d198f55a4 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 9 Oct 2012 16:27:45 -0400 Subject: mips: switch to generic kernel_thread() Signed-off-by: Al Viro --- arch/mips/kernel/entry.S | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/mips/kernel/entry.S') diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index a6c133212003..aab6997b8f47 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -65,6 +65,13 @@ need_resched: b need_resched #endif +FEXPORT(ret_from_kernel_thread) + jal schedule_tail # a0 = struct task_struct *prev + move a0, s1 + jal s0 + li a0, 0 + j sys_exit + FEXPORT(ret_from_fork) jal schedule_tail # a0 = struct task_struct *prev -- cgit v1.2.1 From baf9ff74eda9f0efcc8a68e8a9c9d183be13a810 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 9 Oct 2012 21:16:07 +0200 Subject: MIPS: Switch over to generic sys_execve and kernel_execve. This version contains a few updates by David Daney, in particular it's now using __builtin_frame_address() instead of asm() which depending on personal taste, is slightly more appealing. Signed-off-by: Ralf Baechle --- arch/mips/kernel/entry.S | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/mips/kernel/entry.S') diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index aab6997b8f47..5dcb5fbbbd53 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -192,6 +192,15 @@ syscall_exit_work: jal syscall_trace_leave b resume_userspace +LEAF(ret_from_kernel_execve) + move sp, a0 + ori $28, sp, _THREAD_SIZE - 1 + xori $28, $28, _THREAD_SIZE - 1 + li v0, 0 + li a3, 0 + j syscall_exit_partial + END(ret_from_kernel_execve) + #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_MIPS_MT) /* -- cgit v1.2.1 From 9b0e5d42d9a66621fce83a22987d33325debb588 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 11 Oct 2012 16:01:20 -0400 Subject: mips: switch to saner kernel_execve() semantics Acked-by: Ralf Baechle Signed-off-by: Al Viro --- arch/mips/kernel/entry.S | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'arch/mips/kernel/entry.S') diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index 5dcb5fbbbd53..3320cb4ac1d4 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -69,8 +69,7 @@ FEXPORT(ret_from_kernel_thread) jal schedule_tail # a0 = struct task_struct *prev move a0, s1 jal s0 - li a0, 0 - j sys_exit + j syscall_exit FEXPORT(ret_from_fork) jal schedule_tail # a0 = struct task_struct *prev @@ -192,15 +191,6 @@ syscall_exit_work: jal syscall_trace_leave b resume_userspace -LEAF(ret_from_kernel_execve) - move sp, a0 - ori $28, sp, _THREAD_SIZE - 1 - xori $28, $28, _THREAD_SIZE - 1 - li v0, 0 - li a3, 0 - j syscall_exit_partial - END(ret_from_kernel_execve) - #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_MIPS_MT) /* -- cgit v1.2.1