aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/sys_microblaze.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/sys_microblaze.c')
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index 404c0f24bd41..a6a7bae9f5c6 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -48,24 +48,6 @@ asmlinkage long microblaze_clone(int flags, unsigned long stack,
48 return do_fork(flags, stack, regs, 0, NULL, NULL); 48 return do_fork(flags, stack, regs, 0, NULL, NULL);
49} 49}
50 50
51asmlinkage long microblaze_execve(const char __user *filenamei,
52 const char __user *const __user *argv,
53 const char __user *const __user *envp,
54 struct pt_regs *regs)
55{
56 int error;
57 struct filename *filename;
58
59 filename = getname(filenamei);
60 error = PTR_ERR(filename);
61 if (IS_ERR(filename))
62 goto out;
63 error = do_execve(filename->name, argv, envp, regs);
64 putname(filename);
65out:
66 return error;
67}
68
69asmlinkage long sys_mmap(unsigned long addr, unsigned long len, 51asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
70 unsigned long prot, unsigned long flags, 52 unsigned long prot, unsigned long flags,
71 unsigned long fd, off_t pgoff) 53 unsigned long fd, off_t pgoff)
@@ -75,24 +57,3 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
75 57
76 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); 58 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
77} 59}
78
79/*
80 * Do a system call from kernel instead of calling sys_execve so we
81 * end up with proper pt_regs.
82 */
83int 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}