Skip to content

Commit 019f96a

Browse files
author
Al Viro
committed
frv: switch to generic kernel_execve
Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 460daba commit 019f96a

5 files changed

Lines changed: 10 additions & 39 deletions

File tree

‎arch/frv/include/asm/processor.h‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,12 @@ extern struct task_struct *__kernel_current_task;
9292

9393
/*
9494
* do necessary setup to start up a newly executed thread.
95-
* - need to discard the frame stacked by init() invoking the execve syscall
9695
*/
9796
#define start_thread(_regs, _pc, _usp) \
9897
do { \
99-
__frame = __kernel_frame0_ptr; \
100-
__frame->pc = (_pc); \
101-
__frame->psr &= ~PSR_S; \
102-
__frame->sp = (_usp); \
98+
_regs->pc = (_pc); \
99+
_regs->psr &= ~PSR_S; \
100+
_regs->sp = (_usp); \
103101
} while(0)
104102

105103
/* Free all resources held by a thread. */

‎arch/frv/include/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
#define __ARCH_WANT_SYS_RT_SIGACTION
374374
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
375375
#define __ARCH_WANT_SYS_EXECVE
376+
#define __ARCH_WANT_KERNEL_EXECVE
376377

377378
/*
378379
* "Conditional" syscalls

‎arch/frv/kernel/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ heads-$(CONFIG_MMU) := head-mmu-fr451.o
88
extra-y:= head.o vmlinux.lds
99

1010
obj-y := $(heads-y) entry.o entry-table.o break.o switch_to.o \
11-
kernel_execve.o process.o traps.o ptrace.o signal.o dma.o \
11+
process.o traps.o ptrace.o signal.o dma.o \
1212
sys_frv.o time.o setup.o frv_ksyms.o \
1313
debug-stub.o irq.o sleep.o uaccess.o
1414

‎arch/frv/kernel/entry.S‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,11 @@ ret_from_kernel_thread:
871871
calll @(gr21,gr0)
872872
bra sys_exit
873873

874+
.globl ret_from_kernel_execve
875+
ret_from_kernel_execve:
876+
ori gr28,0,sp
877+
bra __syscall_exit
878+
874879
###################################################################################################
875880
#
876881
# Return to user mode is not as complex as all this looks,

‎arch/frv/kernel/kernel_execve.S‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)