diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/sys_sparc_32.c | 113 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 2 |
4 files changed, 3 insertions, 116 deletions
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c index 3a82e65d8db2..ee995b7dae7e 100644 --- a/arch/sparc/kernel/sys_sparc_32.c +++ b/arch/sparc/kernel/sys_sparc_32.c | |||
@@ -98,119 +98,6 @@ out: | |||
98 | return error; | 98 | return error; |
99 | } | 99 | } |
100 | 100 | ||
101 | /* | ||
102 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
103 | * | ||
104 | * This is really horribly ugly. | ||
105 | */ | ||
106 | |||
107 | asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user *ptr, long fifth) | ||
108 | { | ||
109 | int version, err; | ||
110 | |||
111 | version = call >> 16; /* hack for backward compatibility */ | ||
112 | call &= 0xffff; | ||
113 | |||
114 | if (call <= SEMCTL) | ||
115 | switch (call) { | ||
116 | case SEMOP: | ||
117 | err = sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL); | ||
118 | goto out; | ||
119 | case SEMTIMEDOP: | ||
120 | err = sys_semtimedop (first, (struct sembuf __user *)ptr, second, (const struct timespec __user *) fifth); | ||
121 | goto out; | ||
122 | case SEMGET: | ||
123 | err = sys_semget (first, second, third); | ||
124 | goto out; | ||
125 | case SEMCTL: { | ||
126 | union semun fourth; | ||
127 | err = -EINVAL; | ||
128 | if (!ptr) | ||
129 | goto out; | ||
130 | err = -EFAULT; | ||
131 | if (get_user(fourth.__pad, | ||
132 | (void __user * __user *)ptr)) | ||
133 | goto out; | ||
134 | err = sys_semctl (first, second, third, fourth); | ||
135 | goto out; | ||
136 | } | ||
137 | default: | ||
138 | err = -ENOSYS; | ||
139 | goto out; | ||
140 | } | ||
141 | if (call <= MSGCTL) | ||
142 | switch (call) { | ||
143 | case MSGSND: | ||
144 | err = sys_msgsnd (first, (struct msgbuf __user *) ptr, | ||
145 | second, third); | ||
146 | goto out; | ||
147 | case MSGRCV: | ||
148 | switch (version) { | ||
149 | case 0: { | ||
150 | struct ipc_kludge tmp; | ||
151 | err = -EINVAL; | ||
152 | if (!ptr) | ||
153 | goto out; | ||
154 | err = -EFAULT; | ||
155 | if (copy_from_user(&tmp, (struct ipc_kludge __user *) ptr, sizeof (tmp))) | ||
156 | goto out; | ||
157 | err = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third); | ||
158 | goto out; | ||
159 | } | ||
160 | case 1: default: | ||
161 | err = sys_msgrcv (first, | ||
162 | (struct msgbuf __user *) ptr, | ||
163 | second, fifth, third); | ||
164 | goto out; | ||
165 | } | ||
166 | case MSGGET: | ||
167 | err = sys_msgget ((key_t) first, second); | ||
168 | goto out; | ||
169 | case MSGCTL: | ||
170 | err = sys_msgctl (first, second, (struct msqid_ds __user *) ptr); | ||
171 | goto out; | ||
172 | default: | ||
173 | err = -ENOSYS; | ||
174 | goto out; | ||
175 | } | ||
176 | if (call <= SHMCTL) | ||
177 | switch (call) { | ||
178 | case SHMAT: | ||
179 | switch (version) { | ||
180 | case 0: default: { | ||
181 | ulong raddr; | ||
182 | err = do_shmat (first, (char __user *) ptr, second, &raddr); | ||
183 | if (err) | ||
184 | goto out; | ||
185 | err = -EFAULT; | ||
186 | if (put_user (raddr, (ulong __user *) third)) | ||
187 | goto out; | ||
188 | err = 0; | ||
189 | goto out; | ||
190 | } | ||
191 | case 1: /* iBCS2 emulator entry point */ | ||
192 | err = -EINVAL; | ||
193 | goto out; | ||
194 | } | ||
195 | case SHMDT: | ||
196 | err = sys_shmdt ((char __user *)ptr); | ||
197 | goto out; | ||
198 | case SHMGET: | ||
199 | err = sys_shmget (first, second, third); | ||
200 | goto out; | ||
201 | case SHMCTL: | ||
202 | err = sys_shmctl (first, second, (struct shmid_ds __user *) ptr); | ||
203 | goto out; | ||
204 | default: | ||
205 | err = -ENOSYS; | ||
206 | goto out; | ||
207 | } | ||
208 | else | ||
209 | err = -ENOSYS; | ||
210 | out: | ||
211 | return err; | ||
212 | } | ||
213 | |||
214 | int sparc_mmap_check(unsigned long addr, unsigned long len) | 101 | int sparc_mmap_check(unsigned long addr, unsigned long len) |
215 | { | 102 | { |
216 | if (ARCH_SUN4C && | 103 | if (ARCH_SUN4C && |
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index cb1bef6f14b7..45410e939628 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -426,7 +426,7 @@ out: | |||
426 | * This is really horribly ugly. | 426 | * This is really horribly ugly. |
427 | */ | 427 | */ |
428 | 428 | ||
429 | SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second, | 429 | SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second, |
430 | unsigned long, third, void __user *, ptr, long, fifth) | 430 | unsigned long, third, void __user *, ptr, long, fifth) |
431 | { | 431 | { |
432 | long err; | 432 | long err; |
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h index 68312fe8da74..2c331c37e748 100644 --- a/arch/sparc/kernel/systbls.h +++ b/arch/sparc/kernel/systbls.h | |||
@@ -10,7 +10,7 @@ struct new_utsname; | |||
10 | 10 | ||
11 | extern asmlinkage unsigned long sys_getpagesize(void); | 11 | extern asmlinkage unsigned long sys_getpagesize(void); |
12 | extern asmlinkage long sparc_pipe(struct pt_regs *regs); | 12 | extern asmlinkage long sparc_pipe(struct pt_regs *regs); |
13 | extern asmlinkage long sys_ipc(unsigned int call, int first, | 13 | extern asmlinkage long sys_sparc_ipc(unsigned int call, int first, |
14 | unsigned long second, | 14 | unsigned long second, |
15 | unsigned long third, | 15 | unsigned long third, |
16 | void __user *ptr, long fifth); | 16 | void __user *ptr, long fifth); |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 17614251fb6d..30ca2b1d3a17 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -136,7 +136,7 @@ sys_call_table: | |||
136 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall | 136 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall |
137 | .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 | 137 | .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 |
138 | /*210*/ .word sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo | 138 | /*210*/ .word sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo |
139 | .word sys_ipc, sys_nis_syscall, sys_clone, sys_ioprio_get, sys_adjtimex | 139 | .word sys_sparc_ipc, sys_nis_syscall, sys_clone, sys_ioprio_get, sys_adjtimex |
140 | /*220*/ .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid | 140 | /*220*/ .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid |
141 | .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid | 141 | .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid |
142 | /*230*/ .word sys_select, sys_nis_syscall, sys_splice, sys_stime, sys_statfs64 | 142 | /*230*/ .word sys_select, sys_nis_syscall, sys_splice, sys_stime, sys_statfs64 |