aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/include/asm/syscalls.h39
-rw-r--r--arch/microblaze/kernel/entry-nommu.S12
-rw-r--r--arch/microblaze/kernel/entry.S11
-rw-r--r--arch/microblaze/kernel/signal.c2
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c20
-rw-r--r--arch/microblaze/kernel/syscall_table.S6
6 files changed, 28 insertions, 62 deletions
diff --git a/arch/microblaze/include/asm/syscalls.h b/arch/microblaze/include/asm/syscalls.h
index ea23843e2c2..720761cc741 100644
--- a/arch/microblaze/include/asm/syscalls.h
+++ b/arch/microblaze/include/asm/syscalls.h
@@ -1,41 +1,8 @@
1#ifndef __ASM_MICROBLAZE_SYSCALLS_H 1#ifndef __ASM_MICROBLAZE_SYSCALLS_H
2#define __ASM_MICROBLAZE_SYSCALLS_H
3#ifdef __KERNEL__
4 2
5#include <linux/compiler.h> 3asmlinkage long sys_clone(int flags, unsigned long stack, struct pt_regs *regs);
6#include <linux/linkage.h> 4#define sys_clone sys_clone
7#include <linux/types.h>
8#include <linux/signal.h>
9 5
10/* FIXME will be removed */ 6#include <asm-generic/syscalls.h>
11asmlinkage int sys_ipc(uint call, int first, int second,
12 int third, void *ptr, long fifth);
13 7
14struct pt_regs;
15asmlinkage int sys_vfork(struct pt_regs *regs);
16asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs);
17asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv,
18 char __user *__user *envp, struct pt_regs *regs);
19
20asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len,
21 unsigned long prot, unsigned long flags,
22 unsigned long fd, unsigned long pgoff);
23
24asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
25 unsigned long prot, unsigned long flags,
26 unsigned long fd, off_t offset);
27
28/* from signal.c */
29asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
30 struct pt_regs *regs);
31
32asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act,
33 struct sigaction __user *oact, size_t sigsetsize);
34
35asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
36 struct pt_regs *regs);
37
38asmlinkage long sys_rt_sigreturn(struct pt_regs *regs);
39
40#endif /* __KERNEL__ */
41#endif /* __ASM_MICROBLAZE_SYSCALLS_H */ 8#endif /* __ASM_MICROBLAZE_SYSCALLS_H */
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
index 2eaf3946cb4..9083d85376a 100644
--- a/arch/microblaze/kernel/entry-nommu.S
+++ b/arch/microblaze/kernel/entry-nommu.S
@@ -551,16 +551,16 @@ no_work_pending:
551 rtid r14, 0 551 rtid r14, 0
552 nop 552 nop
553 553
554sys_vfork_wrapper: 554sys_vfork:
555 brid sys_vfork 555 brid microblaze_vfork
556 addk r5, r1, r0 556 addk r5, r1, r0
557 557
558sys_clone_wrapper: 558sys_clone:
559 brid sys_clone 559 brid microblaze_clone
560 addk r7, r1, r0 560 addk r7, r1, r0
561 561
562sys_execve_wrapper: 562sys_execve:
563 brid sys_execve 563 brid microblaze_execve
564 addk r8, r1, r0 564 addk r8, r1, r0
565 565
566sys_rt_sigreturn_wrapper: 566sys_rt_sigreturn_wrapper:
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index ea7107652d8..c7353e79f4a 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -429,12 +429,11 @@ C_ENTRY(ret_from_fork):
429 brid ret_from_trap; /* Do normal trap return */ 429 brid ret_from_trap; /* Do normal trap return */
430 nop; 430 nop;
431 431
432C_ENTRY(sys_vfork_wrapper): 432C_ENTRY(sys_vfork):
433 brid microblaze_vfork /* Do real work (tail-call) */
433 la r5, r1, PTO 434 la r5, r1, PTO
434 brid sys_vfork /* Do real work (tail-call) */
435 nop
436 435
437C_ENTRY(sys_clone_wrapper): 436C_ENTRY(sys_clone):
438 bnei r6, 1f; /* See if child SP arg (arg 1) is 0. */ 437 bnei r6, 1f; /* See if child SP arg (arg 1) is 0. */
439 lwi r6, r1, PTO+PT_R1; /* If so, use paret's stack ptr */ 438 lwi r6, r1, PTO+PT_R1; /* If so, use paret's stack ptr */
4401: la r7, r1, PTO; /* Arg 2: parent context */ 4391: la r7, r1, PTO; /* Arg 2: parent context */
@@ -444,9 +443,9 @@ C_ENTRY(sys_clone_wrapper):
444 brid do_fork /* Do real work (tail-call) */ 443 brid do_fork /* Do real work (tail-call) */
445 nop; 444 nop;
446 445
447C_ENTRY(sys_execve_wrapper): 446C_ENTRY(sys_execve):
448 la r8, r1, PTO; /* add user context as 4th arg */ 447 la r8, r1, PTO; /* add user context as 4th arg */
449 brid sys_execve; /* Do real work (tail-call).*/ 448 brid microblaze_execve; /* Do real work (tail-call).*/
450 nop; 449 nop;
451 450
452C_ENTRY(sys_rt_sigsuspend_wrapper): 451C_ENTRY(sys_rt_sigsuspend_wrapper):
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index 2e5862c3002..493819c25fb 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -46,7 +46,7 @@
46asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall); 46asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall);
47 47
48 48
49asmlinkage int 49asmlinkage long
50sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, 50sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
51 struct pt_regs *regs) 51 struct pt_regs *regs)
52{ 52{
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index 31905ff590b..8c9ebac5da1 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -39,7 +39,7 @@
39 * 39 *
40 * This is really horribly ugly. This will be remove with new toolchain. 40 * This is really horribly ugly. This will be remove with new toolchain.
41 */ 41 */
42asmlinkage int 42asmlinkage long
43sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) 43sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)
44{ 44{
45 int version, ret; 45 int version, ret;
@@ -134,20 +134,20 @@ sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)
134 return ret; 134 return ret;
135} 135}
136 136
137asmlinkage int sys_vfork(struct pt_regs *regs) 137asmlinkage long microblaze_vfork(struct pt_regs *regs)
138{ 138{
139 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->r1, 139 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->r1,
140 regs, 0, NULL, NULL); 140 regs, 0, NULL, NULL);
141} 141}
142 142
143asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs) 143asmlinkage long microblaze_clone(int flags, unsigned long stack, struct pt_regs *regs)
144{ 144{
145 if (!stack) 145 if (!stack)
146 stack = regs->r1; 146 stack = regs->r1;
147 return do_fork(flags, stack, regs, 0, NULL, NULL); 147 return do_fork(flags, stack, regs, 0, NULL, NULL);
148} 148}
149 149
150asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv, 150asmlinkage long microblaze_execve(char __user *filenamei, char __user *__user *argv,
151 char __user *__user *envp, struct pt_regs *regs) 151 char __user *__user *envp, struct pt_regs *regs)
152{ 152{
153 int error; 153 int error;
@@ -163,8 +163,8 @@ out:
163 return error; 163 return error;
164} 164}
165 165
166asmlinkage unsigned long 166asmlinkage long
167sys_mmap2(unsigned long addr, size_t len, 167sys_mmap2(unsigned long addr, unsigned long len,
168 unsigned long prot, unsigned long flags, 168 unsigned long prot, unsigned long flags,
169 unsigned long fd, unsigned long pgoff) 169 unsigned long fd, unsigned long pgoff)
170{ 170{
@@ -189,18 +189,18 @@ out:
189 return ret; 189 return ret;
190} 190}
191 191
192asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, 192asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
193 unsigned long prot, unsigned long flags, 193 unsigned long prot, unsigned long flags,
194 unsigned long fd, off_t offset) 194 unsigned long fd, off_t pgoff)
195{ 195{
196 int err = -EINVAL; 196 int err = -EINVAL;
197 197
198 if (offset & ~PAGE_MASK) { 198 if (pgoff & ~PAGE_MASK) {
199 printk(KERN_INFO "no pagemask in mmap\r\n"); 199 printk(KERN_INFO "no pagemask in mmap\r\n");
200 goto out; 200 goto out;
201 } 201 }
202 202
203 err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 203 err = sys_mmap2(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
204out: 204out:
205 return err; 205 return err;
206} 206}
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index ef0e8932af3..8a609354dde 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -15,7 +15,7 @@ ENTRY(sys_call_table)
15 .long sys_creat 15 .long sys_creat
16 .long sys_link 16 .long sys_link
17 .long sys_unlink /* 10 */ 17 .long sys_unlink /* 10 */
18 .long sys_execve_wrapper 18 .long sys_execve
19 .long sys_chdir 19 .long sys_chdir
20 .long sys_time 20 .long sys_time
21 .long sys_mknod 21 .long sys_mknod
@@ -124,7 +124,7 @@ ENTRY(sys_call_table)
124 .long sys_ipc 124 .long sys_ipc
125 .long sys_fsync 125 .long sys_fsync
126 .long sys_ni_syscall /* sys_sigreturn_wrapper */ 126 .long sys_ni_syscall /* sys_sigreturn_wrapper */
127 .long sys_clone_wrapper /* 120 */ 127 .long sys_clone /* 120 */
128 .long sys_setdomainname 128 .long sys_setdomainname
129 .long sys_newuname 129 .long sys_newuname
130 .long sys_ni_syscall /* modify_ldt */ 130 .long sys_ni_syscall /* modify_ldt */
@@ -194,7 +194,7 @@ ENTRY(sys_call_table)
194 .long sys_sendfile 194 .long sys_sendfile
195 .long sys_ni_syscall /* reserved for streams1 */ 195 .long sys_ni_syscall /* reserved for streams1 */
196 .long sys_ni_syscall /* reserved for streams2 */ 196 .long sys_ni_syscall /* reserved for streams2 */
197 .long sys_vfork_wrapper /* 190 */ 197 .long sys_vfork /* 190 */
198 .long sys_getrlimit 198 .long sys_getrlimit
199 .long sys_mmap2 /* mmap2 */ 199 .long sys_mmap2 /* mmap2 */
200 .long sys_truncate64 200 .long sys_truncate64