aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r--arch/m68k/kernel/entry.S5
-rw-r--r--arch/m68k/kernel/process.c20
-rw-r--r--arch/m68k/kernel/sys_m68k.c17
3 files changed, 5 insertions, 37 deletions
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 8a01f580a02..946cb018775 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -122,6 +122,11 @@ ENTRY(ret_from_kernel_thread)
122 movel %d0,(%sp) 122 movel %d0,(%sp)
123 jra sys_exit 123 jra sys_exit
124 124
125ENTRY(ret_from_kernel_execve)
126 movel 4(%sp), %sp
127 GET_CURRENT(%d0)
128 jra ret_from_exception
129
125#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU) 130#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
126 131
127#ifdef TRAP_DBG_INTERRUPT 132#ifdef TRAP_DBG_INTERRUPT
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index b3d4760c975..4e54b4c0308 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -298,26 +298,6 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
298EXPORT_SYMBOL(dump_fpu); 298EXPORT_SYMBOL(dump_fpu);
299#endif /* CONFIG_FPU */ 299#endif /* CONFIG_FPU */
300 300
301/*
302 * sys_execve() executes a new program.
303 */
304asmlinkage int sys_execve(const char __user *name,
305 const char __user *const __user *argv,
306 const char __user *const __user *envp)
307{
308 int error;
309 char * filename;
310 struct pt_regs *regs = (struct pt_regs *) &name;
311
312 filename = getname(name);
313 error = PTR_ERR(filename);
314 if (IS_ERR(filename))
315 return error;
316 error = do_execve(filename, argv, envp, regs);
317 putname(filename);
318 return error;
319}
320
321unsigned long get_wchan(struct task_struct *p) 301unsigned long get_wchan(struct task_struct *p)
322{ 302{
323 unsigned long fp, pc; 303 unsigned long fp, pc;
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 9a5932ec368..3a480b3df0d 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -549,23 +549,6 @@ asmlinkage int sys_getpagesize(void)
549 return PAGE_SIZE; 549 return PAGE_SIZE;
550} 550}
551 551
552/*
553 * Do a system call from kernel instead of calling sys_execve so we
554 * end up with proper pt_regs.
555 */
556int kernel_execve(const char *filename,
557 const char *const argv[],
558 const char *const envp[])
559{
560 register long __res asm ("%d0") = __NR_execve;
561 register long __a asm ("%d1") = (long)(filename);
562 register long __b asm ("%d2") = (long)(argv);
563 register long __c asm ("%d3") = (long)(envp);
564 asm volatile ("trap #0" : "+d" (__res)
565 : "d" (__a), "d" (__b), "d" (__c));
566 return __res;
567}
568
569asmlinkage unsigned long sys_get_thread_area(void) 552asmlinkage unsigned long sys_get_thread_area(void)
570{ 553{
571 return current_thread_info()->tp_value; 554 return current_thread_info()->tp_value;