diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-21 23:15:25 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 23:00:27 -0500 |
commit | 56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3 (patch) | |
tree | 62ede9a6cc31ed46d78632b65c4a66485fd5d1ad /arch/mips | |
parent | d5dc77bfeeab0b03a32e3db5e31e2f64605634ab (diff) |
merge compat sys_ipc instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/linux32.c | 69 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 |
2 files changed, 1 insertions, 70 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 6852d4876f82..7c57b8d7b255 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -119,75 +119,6 @@ SYSCALL_DEFINE6(32_pwrite, unsigned int, fd, const char __user *, buf, | |||
119 | return sys_pwrite64(fd, buf, count, merge_64(a4, a5)); | 119 | return sys_pwrite64(fd, buf, count, merge_64(a4, a5)); |
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef CONFIG_SYSVIPC | ||
123 | |||
124 | SYSCALL_DEFINE6(32_ipc, u32, call, long, first, long, second, long, third, | ||
125 | unsigned long, ptr, unsigned long, fifth) | ||
126 | { | ||
127 | int version, err; | ||
128 | |||
129 | version = call >> 16; /* hack for backward compatibility */ | ||
130 | call &= 0xffff; | ||
131 | |||
132 | switch (call) { | ||
133 | case SEMOP: | ||
134 | /* struct sembuf is the same on 32 and 64bit :)) */ | ||
135 | err = sys_semtimedop(first, compat_ptr(ptr), second, NULL); | ||
136 | break; | ||
137 | case SEMTIMEDOP: | ||
138 | err = compat_sys_semtimedop(first, compat_ptr(ptr), second, | ||
139 | compat_ptr(fifth)); | ||
140 | break; | ||
141 | case SEMGET: | ||
142 | err = sys_semget(first, second, third); | ||
143 | break; | ||
144 | case SEMCTL: | ||
145 | err = compat_sys_semctl(first, second, third, compat_ptr(ptr)); | ||
146 | break; | ||
147 | case MSGSND: | ||
148 | err = compat_sys_msgsnd(first, second, third, compat_ptr(ptr)); | ||
149 | break; | ||
150 | case MSGRCV: | ||
151 | err = compat_sys_msgrcv(first, second, fifth, third, | ||
152 | version, compat_ptr(ptr)); | ||
153 | break; | ||
154 | case MSGGET: | ||
155 | err = sys_msgget((key_t) first, second); | ||
156 | break; | ||
157 | case MSGCTL: | ||
158 | err = compat_sys_msgctl(first, second, compat_ptr(ptr)); | ||
159 | break; | ||
160 | case SHMAT: | ||
161 | err = compat_sys_shmat(first, second, third, version, | ||
162 | compat_ptr(ptr)); | ||
163 | break; | ||
164 | case SHMDT: | ||
165 | err = sys_shmdt(compat_ptr(ptr)); | ||
166 | break; | ||
167 | case SHMGET: | ||
168 | err = sys_shmget(first, (unsigned)second, third); | ||
169 | break; | ||
170 | case SHMCTL: | ||
171 | err = compat_sys_shmctl(first, second, compat_ptr(ptr)); | ||
172 | break; | ||
173 | default: | ||
174 | err = -EINVAL; | ||
175 | break; | ||
176 | } | ||
177 | |||
178 | return err; | ||
179 | } | ||
180 | |||
181 | #else | ||
182 | |||
183 | SYSCALL_DEFINE6(32_ipc, u32, call, int, first, int, second, int, third, | ||
184 | u32, ptr, u32, fifth) | ||
185 | { | ||
186 | return -ENOSYS; | ||
187 | } | ||
188 | |||
189 | #endif /* CONFIG_SYSVIPC */ | ||
190 | |||
191 | #ifdef CONFIG_MIPS32_N32 | 122 | #ifdef CONFIG_MIPS32_N32 |
192 | SYSCALL_DEFINE4(n32_semctl, int, semid, int, semnum, int, cmd, u32, arg) | 123 | SYSCALL_DEFINE4(n32_semctl, int, semid, int, semnum, int, cmd, u32, arg) |
193 | { | 124 | { |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 91c8c6ea7b09..103bfe570fe8 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -309,7 +309,7 @@ sys_call_table: | |||
309 | PTR compat_sys_wait4 | 309 | PTR compat_sys_wait4 |
310 | PTR sys_swapoff /* 4115 */ | 310 | PTR sys_swapoff /* 4115 */ |
311 | PTR compat_sys_sysinfo | 311 | PTR compat_sys_sysinfo |
312 | PTR sys_32_ipc | 312 | PTR compat_sys_ipc |
313 | PTR sys_fsync | 313 | PTR sys_fsync |
314 | PTR sys32_sigreturn | 314 | PTR sys32_sigreturn |
315 | PTR __sys_clone /* 4120 */ | 315 | PTR __sys_clone /* 4120 */ |