diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/kernel/sys_m68k.c | 16 | ||||
-rw-r--r-- | arch/m68k/mm/motorola.c | 2 | ||||
-rw-r--r-- | arch/m68k/sun3/sun3dvma.c | 2 |
3 files changed, 18 insertions, 2 deletions
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 143c552d38f36..90238a8c9e149 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c @@ -27,6 +27,7 @@ #include <asm/traps.h> #include <asm/ipc.h> #include <asm/page.h> +#include <asm/unistd.h> /* * sys_pipe() is the normal C calling standard for creating @@ -663,3 +664,18 @@ asmlinkage int sys_getpagesize(void) { return PAGE_SIZE; } + +/* + * Do a system call from kernel instead of calling sys_execve so we + * end up with proper pt_regs. + */ +int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +{ + register long __res asm ("%d0") = __NR_execve; + register long __a asm ("%d1") = (long)(filename); + register long __b asm ("%d2") = (long)(argv); + register long __c asm ("%d3") = (long)(envp); + asm volatile ("trap #0" : "+d" (__res) + : "d" (__a), "d" (__b), "d" (__c)); + return __res; +} diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 49015e32d8fcb..afcccdc6ad45d 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -1,5 +1,5 @@ /* - * linux/arch/m68k/motorola.c + * linux/arch/m68k/mm/motorola.c * * Routines specific to the Motorola MMU, originally from: * linux/arch/m68k/init.c diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c index 6c265222cbcdc..a2bc2da7f8f0c 100644 --- a/arch/m68k/sun3/sun3dvma.c +++ b/arch/m68k/sun3/sun3dvma.c @@ -1,5 +1,5 @@ /* - * linux/arch/m68k/mm/sun3dvma.c + * linux/arch/m68k/sun3/sun3dvma.c * * Copyright (C) 2000 Sam Creasey * |