diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-10 11:52:44 -0400 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2012-11-16 02:45:47 -0500 |
commit | 99c59f60fd751876c37fbea01e55606441ac6db4 (patch) | |
tree | 20acbb5f052686052c62a315eb0e25e926b0d2c0 /arch/microblaze/kernel/sys_microblaze.c | |
parent | 2319295dd8dbd076afa136bffb797ef726b605a0 (diff) |
microblaze: switch to generic kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/kernel/sys_microblaze.c')
-rw-r--r-- | arch/microblaze/kernel/sys_microblaze.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index 404c0f24bd41..b200ee7d1da9 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
@@ -75,24 +75,3 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len, | |||
75 | 75 | ||
76 | return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); | 76 | return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); |
77 | } | 77 | } |
78 | |||
79 | /* | ||
80 | * Do a system call from kernel instead of calling sys_execve so we | ||
81 | * end up with proper pt_regs. | ||
82 | */ | ||
83 | int kernel_execve(const char *filename, | ||
84 | const char *const argv[], | ||
85 | const char *const envp[]) | ||
86 | { | ||
87 | register const char *__a __asm__("r5") = filename; | ||
88 | register const void *__b __asm__("r6") = argv; | ||
89 | register const void *__c __asm__("r7") = envp; | ||
90 | register unsigned long __syscall __asm__("r12") = __NR_execve; | ||
91 | register unsigned long __ret __asm__("r3"); | ||
92 | __asm__ __volatile__ ("brki r14, 0x8" | ||
93 | : "=r" (__ret), "=r" (__syscall) | ||
94 | : "1" (__syscall), "r" (__a), "r" (__b), "r" (__c) | ||
95 | : "r4", "r8", "r9", | ||
96 | "r10", "r11", "r14", "cc", "memory"); | ||
97 | return __ret; | ||
98 | } | ||