diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-03 14:56:02 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-14 23:12:33 -0400 |
commit | 1703a219f7f5ab2c39514f9f0763001cdc907d25 (patch) | |
tree | af79698ae74c94418ef31483c6e75d9588a3f757 /arch/cris/arch-v10 | |
parent | 69b58a67213506f98835b0ee8cf24324f59a1442 (diff) |
cris: switch to generic kernel_execve/sys_execve
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/cris/arch-v10')
-rw-r--r-- | arch/cris/arch-v10/kernel/entry.S | 11 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/process.c | 23 |
2 files changed, 2 insertions, 32 deletions
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index b8e39e00acb2..897bba67bf7a 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -87,8 +87,8 @@ ret_from_kernel_thread: | |||
87 | jsr schedule_tail | 87 | jsr schedule_tail |
88 | move.d $r2, $r10 ; argument is here | 88 | move.d $r2, $r10 ; argument is here |
89 | jsr $r1 ; call the payload | 89 | jsr $r1 ; call the payload |
90 | moveq 0, $r10 | 90 | moveq 0, $r9 ; no syscall restarts, TYVM... |
91 | jsr sys_exit ; never returns | 91 | ba ret_from_sys_call |
92 | 92 | ||
93 | ret_from_intr: | 93 | ret_from_intr: |
94 | ;; check for resched if preemptive kernel or if we're going back to user-mode | 94 | ;; check for resched if preemptive kernel or if we're going back to user-mode |
@@ -594,13 +594,6 @@ _ugdb_handle_breakpoint: | |||
594 | ba do_sigtrap ; SIGTRAP the offending process. | 594 | ba do_sigtrap ; SIGTRAP the offending process. |
595 | pop $dccr ; Restore dccr in delay slot. | 595 | pop $dccr ; Restore dccr in delay slot. |
596 | 596 | ||
597 | .global kernel_execve | ||
598 | kernel_execve: | ||
599 | move.d __NR_execve, $r9 | ||
600 | break 13 | ||
601 | ret | ||
602 | nop | ||
603 | |||
604 | .data | 597 | .data |
605 | 598 | ||
606 | hw_bp_trigs: | 599 | hw_bp_trigs: |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index 8a673aa81cdd..1d6458287f38 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -167,29 +167,6 @@ asmlinkage int sys_vfork(void) | |||
167 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), current_pt_regs(), 0, NULL, NULL); | 167 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), current_pt_regs(), 0, NULL, NULL); |
168 | } | 168 | } |
169 | 169 | ||
170 | /* | ||
171 | * sys_execve() executes a new program. | ||
172 | */ | ||
173 | asmlinkage int sys_execve(const char *fname, | ||
174 | const char *const *argv, | ||
175 | const char *const *envp, | ||
176 | long r13, long mof, long srp, | ||
177 | struct pt_regs *regs) | ||
178 | { | ||
179 | int error; | ||
180 | struct filename *filename; | ||
181 | |||
182 | filename = getname(fname); | ||
183 | error = PTR_ERR(filename); | ||
184 | |||
185 | if (IS_ERR(filename)) | ||
186 | goto out; | ||
187 | error = do_execve(filename->name, argv, envp, regs); | ||
188 | putname(filename); | ||
189 | out: | ||
190 | return error; | ||
191 | } | ||
192 | |||
193 | unsigned long get_wchan(struct task_struct *p) | 170 | unsigned long get_wchan(struct task_struct *p) |
194 | { | 171 | { |
195 | #if 0 | 172 | #if 0 |