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.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index 31905ff590b7..e000bce09b2b 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -15,7 +15,6 @@
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/smp_lock.h>
19#include <linux/syscalls.h> 18#include <linux/syscalls.h>
20#include <linux/sem.h> 19#include <linux/sem.h>
21#include <linux/msg.h> 20#include <linux/msg.h>
@@ -39,7 +38,7 @@
39 * 38 *
40 * This is really horribly ugly. This will be remove with new toolchain. 39 * This is really horribly ugly. This will be remove with new toolchain.
41 */ 40 */
42asmlinkage int 41asmlinkage long
43sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) 42sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)
44{ 43{
45 int version, ret; 44 int version, ret;
@@ -134,20 +133,20 @@ sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)
134 return ret; 133 return ret;
135} 134}
136 135
137asmlinkage int sys_vfork(struct pt_regs *regs) 136asmlinkage long microblaze_vfork(struct pt_regs *regs)
138{ 137{
139 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->r1, 138 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->r1,
140 regs, 0, NULL, NULL); 139 regs, 0, NULL, NULL);
141} 140}
142 141
143asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs) 142asmlinkage long microblaze_clone(int flags, unsigned long stack, struct pt_regs *regs)
144{ 143{
145 if (!stack) 144 if (!stack)
146 stack = regs->r1; 145 stack = regs->r1;
147 return do_fork(flags, stack, regs, 0, NULL, NULL); 146 return do_fork(flags, stack, regs, 0, NULL, NULL);
148} 147}
149 148
150asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv, 149asmlinkage long microblaze_execve(char __user *filenamei, char __user *__user *argv,
151 char __user *__user *envp, struct pt_regs *regs) 150 char __user *__user *envp, struct pt_regs *regs)
152{ 151{
153 int error; 152 int error;
@@ -163,8 +162,8 @@ out:
163 return error; 162 return error;
164} 163}
165 164
166asmlinkage unsigned long 165asmlinkage long
167sys_mmap2(unsigned long addr, size_t len, 166sys_mmap2(unsigned long addr, unsigned long len,
168 unsigned long prot, unsigned long flags, 167 unsigned long prot, unsigned long flags,
169 unsigned long fd, unsigned long pgoff) 168 unsigned long fd, unsigned long pgoff)
170{ 169{
@@ -189,18 +188,18 @@ out:
189 return ret; 188 return ret;
190} 189}
191 190
192asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, 191asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
193 unsigned long prot, unsigned long flags, 192 unsigned long prot, unsigned long flags,
194 unsigned long fd, off_t offset) 193 unsigned long fd, off_t pgoff)
195{ 194{
196 int err = -EINVAL; 195 int err = -EINVAL;
197 196
198 if (offset & ~PAGE_MASK) { 197 if (pgoff & ~PAGE_MASK) {
199 printk(KERN_INFO "no pagemask in mmap\r\n"); 198 printk(KERN_INFO "no pagemask in mmap\r\n");
200 goto out; 199 goto out;
201 } 200 }
202 201
203 err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 202 err = sys_mmap2(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
204out: 203out:
205 return err; 204 return err;
206} 205}