aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r--arch/sh/kernel/process.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index a11e2aa73cbc..6334a4c54c7c 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -17,6 +17,7 @@
17#include <linux/kexec.h> 17#include <linux/kexec.h>
18#include <linux/kdebug.h> 18#include <linux/kdebug.h>
19#include <linux/tick.h> 19#include <linux/tick.h>
20#include <linux/reboot.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
21#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
22#include <asm/pgalloc.h> 23#include <asm/pgalloc.h>
@@ -319,9 +320,7 @@ static void ubc_set_tracing(int asid, unsigned long pc)
319 ctrl_outl(pc, UBC_BARA); 320 ctrl_outl(pc, UBC_BARA);
320 321
321#ifdef CONFIG_MMU 322#ifdef CONFIG_MMU
322 /* We don't have any ASID settings for the SH-2! */ 323 ctrl_outb(asid, UBC_BASRA);
323 if (current_cpu_data.type != CPU_SH7604)
324 ctrl_outb(asid, UBC_BASRA);
325#endif 324#endif
326 325
327 ctrl_outl(0, UBC_BAMRA); 326 ctrl_outl(0, UBC_BAMRA);
@@ -405,8 +404,8 @@ asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
405 unsigned long r6, unsigned long r7, 404 unsigned long r6, unsigned long r7,
406 struct pt_regs __regs) 405 struct pt_regs __regs)
407{ 406{
408 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
409#ifdef CONFIG_MMU 407#ifdef CONFIG_MMU
408 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
410 return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL); 409 return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL);
411#else 410#else
412 /* fork almost works, enough to trick you into looking elsewhere :-( */ 411 /* fork almost works, enough to trick you into looking elsewhere :-( */
@@ -449,23 +448,20 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
449/* 448/*
450 * sys_execve() executes a new program. 449 * sys_execve() executes a new program.
451 */ 450 */
452asmlinkage int sys_execve(char *ufilename, char **uargv, 451asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
453 char **uenvp, unsigned long r7, 452 char __user * __user *uenvp, unsigned long r7,
454 struct pt_regs __regs) 453 struct pt_regs __regs)
455{ 454{
456 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 455 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
457 int error; 456 int error;
458 char *filename; 457 char *filename;
459 458
460 filename = getname((char __user *)ufilename); 459 filename = getname(ufilename);
461 error = PTR_ERR(filename); 460 error = PTR_ERR(filename);
462 if (IS_ERR(filename)) 461 if (IS_ERR(filename))
463 goto out; 462 goto out;
464 463
465 error = do_execve(filename, 464 error = do_execve(filename, uargv, uenvp, regs);
466 (char __user * __user *)uargv,
467 (char __user * __user *)uenvp,
468 regs);
469 if (error == 0) { 465 if (error == 0) {
470 task_lock(current); 466 task_lock(current);
471 current->ptrace &= ~PT_DTRACE; 467 current->ptrace &= ~PT_DTRACE;