diff options
Diffstat (limited to 'arch/sh/kernel/sys_sh32.c')
-rw-r--r-- | arch/sh/kernel/sys_sh32.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c index f56b6fe5c5d0..497bab3a0401 100644 --- a/arch/sh/kernel/sys_sh32.c +++ b/arch/sh/kernel/sys_sh32.c | |||
@@ -60,27 +60,3 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, | |||
60 | (u64)len0 << 32 | len1, advice); | 60 | (u64)len0 << 32 | len1, advice); |
61 | #endif | 61 | #endif |
62 | } | 62 | } |
63 | |||
64 | #if defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH2A) | ||
65 | #define SYSCALL_ARG3 "trapa #0x23" | ||
66 | #else | ||
67 | #define SYSCALL_ARG3 "trapa #0x13" | ||
68 | #endif | ||
69 | |||
70 | /* | ||
71 | * Do a system call from kernel instead of calling sys_execve so we | ||
72 | * end up with proper pt_regs. | ||
73 | */ | ||
74 | int kernel_execve(const char *filename, | ||
75 | const char *const argv[], | ||
76 | const char *const envp[]) | ||
77 | { | ||
78 | register long __sc0 __asm__ ("r3") = __NR_execve; | ||
79 | register long __sc4 __asm__ ("r4") = (long) filename; | ||
80 | register long __sc5 __asm__ ("r5") = (long) argv; | ||
81 | register long __sc6 __asm__ ("r6") = (long) envp; | ||
82 | __asm__ __volatile__ (SYSCALL_ARG3 : "=z" (__sc0) | ||
83 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) | ||
84 | : "memory"); | ||
85 | return __sc0; | ||
86 | } | ||