diff options
Diffstat (limited to 'arch/microblaze/kernel/sys_microblaze.c')
-rw-r--r-- | arch/microblaze/kernel/sys_microblaze.c | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index 8c9ebac5da1..b96f1682bb2 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> |
@@ -34,105 +33,6 @@ | |||
34 | #include <linux/unistd.h> | 33 | #include <linux/unistd.h> |
35 | 34 | ||
36 | #include <asm/syscalls.h> | 35 | #include <asm/syscalls.h> |
37 | /* | ||
38 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
39 | * | ||
40 | * This is really horribly ugly. This will be remove with new toolchain. | ||
41 | */ | ||
42 | asmlinkage long | ||
43 | sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) | ||
44 | { | ||
45 | int version, ret; | ||
46 | |||
47 | version = call >> 16; /* hack for backward compatibility */ | ||
48 | call &= 0xffff; | ||
49 | |||
50 | ret = -EINVAL; | ||
51 | switch (call) { | ||
52 | case SEMOP: | ||
53 | ret = sys_semop(first, (struct sembuf *)ptr, second); | ||
54 | break; | ||
55 | case SEMGET: | ||
56 | ret = sys_semget(first, second, third); | ||
57 | break; | ||
58 | case SEMCTL: | ||
59 | { | ||
60 | union semun fourth; | ||
61 | |||
62 | if (!ptr) | ||
63 | break; | ||
64 | ret = (access_ok(VERIFY_READ, ptr, sizeof(long)) ? 0 : -EFAULT) | ||
65 | || (get_user(fourth.__pad, (void **)ptr)) ; | ||
66 | if (ret) | ||
67 | break; | ||
68 | ret = sys_semctl(first, second, third, fourth); | ||
69 | break; | ||
70 | } | ||
71 | case MSGSND: | ||
72 | ret = sys_msgsnd(first, (struct msgbuf *) ptr, second, third); | ||
73 | break; | ||
74 | case MSGRCV: | ||
75 | switch (version) { | ||
76 | case 0: { | ||
77 | struct ipc_kludge tmp; | ||
78 | |||
79 | if (!ptr) | ||
80 | break; | ||
81 | ret = (access_ok(VERIFY_READ, ptr, sizeof(tmp)) | ||
82 | ? 0 : -EFAULT) || copy_from_user(&tmp, | ||
83 | (struct ipc_kludge *) ptr, sizeof(tmp)); | ||
84 | if (ret) | ||
85 | break; | ||
86 | ret = sys_msgrcv(first, tmp.msgp, second, tmp.msgtyp, | ||
87 | third); | ||
88 | break; | ||
89 | } | ||
90 | default: | ||
91 | ret = sys_msgrcv(first, (struct msgbuf *) ptr, | ||
92 | second, fifth, third); | ||
93 | break; | ||
94 | } | ||
95 | break; | ||
96 | case MSGGET: | ||
97 | ret = sys_msgget((key_t) first, second); | ||
98 | break; | ||
99 | case MSGCTL: | ||
100 | ret = sys_msgctl(first, second, (struct msqid_ds *) ptr); | ||
101 | break; | ||
102 | case SHMAT: | ||
103 | switch (version) { | ||
104 | default: { | ||
105 | ulong raddr; | ||
106 | ret = access_ok(VERIFY_WRITE, (ulong *) third, | ||
107 | sizeof(ulong)) ? 0 : -EFAULT; | ||
108 | if (ret) | ||
109 | break; | ||
110 | ret = do_shmat(first, (char *) ptr, second, &raddr); | ||
111 | if (ret) | ||
112 | break; | ||
113 | ret = put_user(raddr, (ulong *) third); | ||
114 | break; | ||
115 | } | ||
116 | case 1: /* iBCS2 emulator entry point */ | ||
117 | if (!segment_eq(get_fs(), get_ds())) | ||
118 | break; | ||
119 | ret = do_shmat(first, (char *) ptr, second, | ||
120 | (ulong *) third); | ||
121 | break; | ||
122 | } | ||
123 | break; | ||
124 | case SHMDT: | ||
125 | ret = sys_shmdt((char *)ptr); | ||
126 | break; | ||
127 | case SHMGET: | ||
128 | ret = sys_shmget(first, second, third); | ||
129 | break; | ||
130 | case SHMCTL: | ||
131 | ret = sys_shmctl(first, second, (struct shmid_ds *) ptr); | ||
132 | break; | ||
133 | } | ||
134 | return ret; | ||
135 | } | ||
136 | 36 | ||
137 | asmlinkage long microblaze_vfork(struct pt_regs *regs) | 37 | asmlinkage long microblaze_vfork(struct pt_regs *regs) |
138 | { | 38 | { |