diff options
author | Helge Deller <deller@gmx.de> | 2015-02-16 16:19:06 -0500 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2015-02-16 16:35:05 -0500 |
commit | 863722e856e64dae0e252b6bb546737c6c5626ce (patch) | |
tree | 2f95be32cb7842d22bc40096269563aa972ff117 | |
parent | e28f295e230b430495a8e6d60e2fb23d95910434 (diff) |
parisc: hpux - Delete files in hpux subdirectory
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | arch/parisc/hpux/Makefile | 5 | ||||
-rw-r--r-- | arch/parisc/hpux/entry_hpux.S | 546 | ||||
-rw-r--r-- | arch/parisc/hpux/fs.c | 192 | ||||
-rw-r--r-- | arch/parisc/hpux/gate.S | 107 | ||||
-rw-r--r-- | arch/parisc/hpux/ioctl.c | 72 | ||||
-rw-r--r-- | arch/parisc/hpux/sys_hpux.c | 963 | ||||
-rw-r--r-- | arch/parisc/hpux/wrappers.S | 250 |
7 files changed, 0 insertions, 2135 deletions
diff --git a/arch/parisc/hpux/Makefile b/arch/parisc/hpux/Makefile deleted file mode 100644 index 1048fb69f06d..000000000000 --- a/arch/parisc/hpux/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for HPUX emulation | ||
3 | # | ||
4 | |||
5 | obj-y := entry_hpux.o gate.o wrappers.o fs.o ioctl.o sys_hpux.o | ||
diff --git a/arch/parisc/hpux/entry_hpux.S b/arch/parisc/hpux/entry_hpux.S deleted file mode 100644 index d15a413572f0..000000000000 --- a/arch/parisc/hpux/entry_hpux.S +++ /dev/null | |||
@@ -1,546 +0,0 @@ | |||
1 | /* syscall table for HPUX specific syscalls | ||
2 | * | ||
3 | * Linux/PA-RISC Project (http://www.parisc-linux.org/) | ||
4 | * Copyright (C) 1999 Matthew Wilcox <willy at debian . org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <asm/unistd.h> | ||
22 | #include <asm/assembly.h> | ||
23 | #include <linux/sys.h> | ||
24 | #include <linux/linkage.h> | ||
25 | |||
26 | #define ENTRY_NAME(_name_) ASM_ULONG_INSN _name_ | ||
27 | |||
28 | .section .rodata,"a" | ||
29 | .import hpux_unimplemented_wrapper | ||
30 | ENTRY(hpux_call_table) | ||
31 | ENTRY_NAME(sys_ni_syscall) /* 0 */ | ||
32 | ENTRY_NAME(sys_exit) | ||
33 | ENTRY_NAME(hpux_fork_wrapper) | ||
34 | ENTRY_NAME(sys_read) | ||
35 | ENTRY_NAME(sys_write) | ||
36 | ENTRY_NAME(sys_open) /* 5 */ | ||
37 | ENTRY_NAME(sys_close) | ||
38 | ENTRY_NAME(hpux_wait) | ||
39 | ENTRY_NAME(sys_creat) | ||
40 | ENTRY_NAME(sys_link) | ||
41 | ENTRY_NAME(sys_unlink) /* 10 */ | ||
42 | ENTRY_NAME(hpux_execv_wrapper) | ||
43 | ENTRY_NAME(sys_chdir) | ||
44 | ENTRY_NAME(sys_time) | ||
45 | ENTRY_NAME(sys_mknod) | ||
46 | ENTRY_NAME(sys_chmod) /* 15 */ | ||
47 | ENTRY_NAME(sys_chown) | ||
48 | ENTRY_NAME(hpux_brk) | ||
49 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
50 | ENTRY_NAME(sys_lseek) | ||
51 | ENTRY_NAME(sys_getpid) /* 20 */ | ||
52 | ENTRY_NAME(hpux_mount) | ||
53 | ENTRY_NAME(sys_oldumount) | ||
54 | ENTRY_NAME(sys_setuid) | ||
55 | ENTRY_NAME(sys_getuid) | ||
56 | ENTRY_NAME(sys_stime) /* 25 */ | ||
57 | ENTRY_NAME(hpux_ptrace) | ||
58 | ENTRY_NAME(sys_alarm) | ||
59 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
60 | ENTRY_NAME(sys_pause) | ||
61 | ENTRY_NAME(sys_utime) /* 30 */ | ||
62 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
63 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
64 | ENTRY_NAME(sys_access) | ||
65 | ENTRY_NAME(hpux_nice) | ||
66 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 35 */ | ||
67 | ENTRY_NAME(sys_sync) | ||
68 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
69 | ENTRY_NAME(sys_newstat) | ||
70 | ENTRY_NAME(hpux_setpgrp3) | ||
71 | ENTRY_NAME(sys_newlstat) /* 40 */ | ||
72 | ENTRY_NAME(sys_dup) | ||
73 | ENTRY_NAME(hpux_pipe_wrapper) | ||
74 | ENTRY_NAME(sys_times) | ||
75 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
76 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 45 */ | ||
77 | ENTRY_NAME(sys_setgid) | ||
78 | ENTRY_NAME(sys_getgid) | ||
79 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
80 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
81 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 50 */ | ||
82 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
83 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
84 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
85 | ENTRY_NAME(hpux_ioctl) | ||
86 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 55 */ | ||
87 | ENTRY_NAME(sys_symlink) | ||
88 | ENTRY_NAME(hpux_utssys) | ||
89 | ENTRY_NAME(sys_readlink) | ||
90 | ENTRY_NAME(hpux_execve_wrapper) | ||
91 | ENTRY_NAME(sys_umask) /* 60 */ | ||
92 | ENTRY_NAME(sys_chroot) | ||
93 | ENTRY_NAME(sys_fcntl) | ||
94 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
95 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
96 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 65 */ | ||
97 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
98 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
99 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
100 | ENTRY_NAME(hpux_sbrk) | ||
101 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 70 */ | ||
102 | ENTRY_NAME(sys_mmap) | ||
103 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
104 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
105 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
106 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 75 */ | ||
107 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
108 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
109 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
110 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
111 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 80 */ | ||
112 | ENTRY_NAME(sys_getpgid) | ||
113 | ENTRY_NAME(sys_setpgid) | ||
114 | ENTRY_NAME(sys_setitimer) | ||
115 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
116 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 85 */ | ||
117 | ENTRY_NAME(sys_getitimer) | ||
118 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
119 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
120 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
121 | ENTRY_NAME(sys_dup2) /* 90 */ | ||
122 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
123 | ENTRY_NAME(sys_newfstat) | ||
124 | ENTRY_NAME(sys_select) | ||
125 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
126 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 95 */ | ||
127 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
128 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
129 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
130 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
131 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 100 */ | ||
132 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
133 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
134 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
135 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
136 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 105 */ | ||
137 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
138 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
139 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
140 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
141 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 110 */ | ||
142 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
143 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
144 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
145 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
146 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 115 */ | ||
147 | ENTRY_NAME(sys_gettimeofday) | ||
148 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
149 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
150 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
151 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 120 */ | ||
152 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
153 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
154 | ENTRY_NAME(sys_fchown) | ||
155 | ENTRY_NAME(sys_fchmod) | ||
156 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 125 */ | ||
157 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
158 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
159 | ENTRY_NAME(sys_rename) | ||
160 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
161 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 130 */ | ||
162 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
163 | ENTRY_NAME(hpux_sysconf) | ||
164 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
165 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
166 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 135 */ | ||
167 | ENTRY_NAME(sys_mkdir) | ||
168 | ENTRY_NAME(sys_rmdir) | ||
169 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
170 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
171 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 140 */ | ||
172 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
173 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
174 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
175 | ENTRY_NAME(sys_getrlimit) | ||
176 | ENTRY_NAME(sys_setrlimit) /* 145 */ | ||
177 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
178 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
179 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
180 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
181 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 150 */ | ||
182 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
183 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
184 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
185 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
186 | ENTRY_NAME(hpux_lockf) /* 155 */ | ||
187 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
188 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
189 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
190 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
191 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 160 */ | ||
192 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
193 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
194 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
195 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
196 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 165 */ | ||
197 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
198 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
199 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
200 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
201 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 170 */ | ||
202 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
203 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
204 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
205 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
206 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 175 */ | ||
207 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
208 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
209 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
210 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
211 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 180 */ | ||
212 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
213 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
214 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
215 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
216 | ENTRY_NAME(sys_sigprocmask) /* 185 */ | ||
217 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
218 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
219 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
220 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
221 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 190 */ | ||
222 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
223 | ENTRY_NAME(hpux_getdomainname) | ||
224 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
225 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
226 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 195 */ | ||
227 | ENTRY_NAME(hpux_statfs) | ||
228 | ENTRY_NAME(hpux_fstatfs) | ||
229 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
230 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
231 | ENTRY_NAME(sys_waitpid) /* 200 */ | ||
232 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
233 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
234 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
235 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
236 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 205 */ | ||
237 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
238 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
239 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
240 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
241 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 210 */ | ||
242 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
243 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
244 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
245 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
246 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 215 */ | ||
247 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
248 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
249 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
250 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
251 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 220 */ | ||
252 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
253 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
254 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
255 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
256 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 225 */ | ||
257 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
258 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
259 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
260 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
261 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 230 */ | ||
262 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
263 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
264 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
265 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
266 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 235 */ | ||
267 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
268 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
269 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
270 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
271 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 240 */ | ||
272 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
273 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
274 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
275 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
276 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 245 */ | ||
277 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
278 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
279 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
280 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
281 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 250 */ | ||
282 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
283 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
284 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
285 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
286 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 255 */ | ||
287 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
288 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
289 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
290 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
291 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 260 */ | ||
292 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
293 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
294 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
295 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
296 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 265 */ | ||
297 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
298 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
299 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
300 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
301 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 270 */ | ||
302 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
303 | ENTRY_NAME(sys_fchdir) | ||
304 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
305 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
306 | ENTRY_NAME(sys_accept) /* 275 */ | ||
307 | ENTRY_NAME(sys_bind) | ||
308 | ENTRY_NAME(sys_connect) | ||
309 | ENTRY_NAME(sys_getpeername) | ||
310 | ENTRY_NAME(sys_getsockname) | ||
311 | ENTRY_NAME(sys_getsockopt) /* 280 */ | ||
312 | ENTRY_NAME(sys_listen) | ||
313 | ENTRY_NAME(sys_recv) | ||
314 | ENTRY_NAME(sys_recvfrom) | ||
315 | ENTRY_NAME(sys_recvmsg) | ||
316 | ENTRY_NAME(sys_send) /* 285 */ | ||
317 | ENTRY_NAME(sys_sendmsg) | ||
318 | ENTRY_NAME(sys_sendto) | ||
319 | ENTRY_NAME(sys_setsockopt) | ||
320 | ENTRY_NAME(sys_shutdown) | ||
321 | ENTRY_NAME(sys_socket) /* 290 */ | ||
322 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
323 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
324 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
325 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
326 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 295 */ | ||
327 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
328 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
329 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
330 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
331 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 300 */ | ||
332 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
333 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
334 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
335 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
336 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 305 */ | ||
337 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
338 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
339 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
340 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
341 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 310 */ | ||
342 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
343 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
344 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
345 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
346 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 315 */ | ||
347 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
348 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
349 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
350 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
351 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 320 */ | ||
352 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
353 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
354 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
355 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
356 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 325 */ | ||
357 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
358 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
359 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
360 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
361 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 330 */ | ||
362 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
363 | ENTRY_NAME(sys_lchown) | ||
364 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
365 | ENTRY_NAME(hpux_sysfs) | ||
366 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 335 */ | ||
367 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
368 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
369 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
370 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
371 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 340 */ | ||
372 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
373 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
374 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
375 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
376 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 345 */ | ||
377 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
378 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
379 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
380 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
381 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 350 */ | ||
382 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
383 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
384 | ENTRY_NAME(sys_nanosleep) | ||
385 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
386 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 355 */ | ||
387 | ENTRY_NAME(hpux_getdents) | ||
388 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
389 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
390 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
391 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 360 */ | ||
392 | ENTRY_NAME(hpux_fstat64) | ||
393 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
394 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
395 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
396 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 365 */ | ||
397 | ENTRY_NAME(hpux_lstat64) | ||
398 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
399 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
400 | ENTRY_NAME(hpux_stat64) | ||
401 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 370 */ | ||
402 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
403 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
404 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
405 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
406 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 375 */ | ||
407 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
408 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
409 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
410 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
411 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 380 */ | ||
412 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
413 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
414 | ENTRY_NAME(hpux_setpgrp) | ||
415 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
416 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 385 */ | ||
417 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
418 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
419 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
420 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
421 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 390 */ | ||
422 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
423 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
424 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
425 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
426 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 395 */ | ||
427 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
428 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
429 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
430 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
431 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 400 */ | ||
432 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
433 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
434 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
435 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
436 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 405 */ | ||
437 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
438 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
439 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
440 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
441 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 410 */ | ||
442 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
443 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
444 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
445 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
446 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 415 */ | ||
447 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
448 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
449 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
450 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
451 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 420 */ | ||
452 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
453 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
454 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
455 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
456 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 425 */ | ||
457 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
458 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
459 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
460 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
461 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 430 */ | ||
462 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
463 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
464 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
465 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
466 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 435 */ | ||
467 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
468 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
469 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
470 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
471 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 440 */ | ||
472 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
473 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
474 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
475 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
476 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 445 */ | ||
477 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
478 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
479 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
480 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
481 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 450 */ | ||
482 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
483 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
484 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
485 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
486 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 455 */ | ||
487 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
488 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
489 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
490 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
491 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 460 */ | ||
492 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
493 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
494 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
495 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
496 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 465 */ | ||
497 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
498 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
499 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
500 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
501 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 470 */ | ||
502 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
503 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
504 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
505 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
506 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 475 */ | ||
507 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
508 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
509 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
510 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
511 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 480 */ | ||
512 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
513 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
514 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
515 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
516 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 485 */ | ||
517 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
518 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
519 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
520 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
521 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 490 */ | ||
522 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
523 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
524 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
525 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
526 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 495 */ | ||
527 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
528 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
529 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
530 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
531 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 500 */ | ||
532 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
533 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
534 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
535 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
536 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 505 */ | ||
537 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
538 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
539 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
540 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
541 | ENTRY_NAME(hpux_unimplemented_wrapper) /* 510 */ | ||
542 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
543 | ENTRY_NAME(hpux_unimplemented_wrapper) | ||
544 | END(hpux_call_table) | ||
545 | .end | ||
546 | |||
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c deleted file mode 100644 index 97a7bf8df348..000000000000 --- a/arch/parisc/hpux/fs.c +++ /dev/null | |||
@@ -1,192 +0,0 @@ | |||
1 | /* | ||
2 | * Implements HPUX syscalls. | ||
3 | * | ||
4 | * Copyright (C) 1999 Matthew Wilcox <willy with parisc-linux.org> | ||
5 | * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> | ||
6 | * Copyright (C) 2000 John Marvin <jsm with parisc-linux.org> | ||
7 | * Copyright (C) 2000 Philipp Rumpf | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/mm.h> | ||
26 | #include <linux/fs.h> | ||
27 | #include <linux/sched.h> | ||
28 | #include <linux/file.h> | ||
29 | #include <linux/ptrace.h> | ||
30 | #include <linux/slab.h> | ||
31 | #include <asm/errno.h> | ||
32 | #include <asm/uaccess.h> | ||
33 | |||
34 | int hpux_execve(struct pt_regs *regs) | ||
35 | { | ||
36 | return do_execve(getname((const char __user *) regs->gr[26]), | ||
37 | (const char __user *const __user *) regs->gr[25], | ||
38 | (const char __user *const __user *) regs->gr[24]); | ||
39 | } | ||
40 | |||
41 | struct hpux_dirent { | ||
42 | loff_t d_off; | ||
43 | ino_t d_ino; | ||
44 | short d_reclen; | ||
45 | short d_namlen; | ||
46 | char d_name[1]; | ||
47 | }; | ||
48 | |||
49 | struct getdents_callback { | ||
50 | struct dir_context ctx; | ||
51 | struct hpux_dirent __user *current_dir; | ||
52 | struct hpux_dirent __user *previous; | ||
53 | int count; | ||
54 | int error; | ||
55 | }; | ||
56 | |||
57 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) | ||
58 | |||
59 | static int filldir(struct dir_context *ctx, const char *name, int namlen, | ||
60 | loff_t offset, u64 ino, unsigned d_type) | ||
61 | { | ||
62 | struct hpux_dirent __user * dirent; | ||
63 | struct getdents_callback *buf = | ||
64 | container_of(ctx, struct getdents_callback, ctx); | ||
65 | ino_t d_ino; | ||
66 | int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long)); | ||
67 | |||
68 | buf->error = -EINVAL; /* only used if we fail.. */ | ||
69 | if (reclen > buf->count) | ||
70 | return -EINVAL; | ||
71 | d_ino = ino; | ||
72 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) { | ||
73 | buf->error = -EOVERFLOW; | ||
74 | return -EOVERFLOW; | ||
75 | } | ||
76 | dirent = buf->previous; | ||
77 | if (dirent) | ||
78 | if (put_user(offset, &dirent->d_off)) | ||
79 | goto Efault; | ||
80 | dirent = buf->current_dir; | ||
81 | if (put_user(d_ino, &dirent->d_ino) || | ||
82 | put_user(reclen, &dirent->d_reclen) || | ||
83 | put_user(namlen, &dirent->d_namlen) || | ||
84 | copy_to_user(dirent->d_name, name, namlen) || | ||
85 | put_user(0, dirent->d_name + namlen)) | ||
86 | goto Efault; | ||
87 | buf->previous = dirent; | ||
88 | buf->current_dir = (void __user *)dirent + reclen; | ||
89 | buf->count -= reclen; | ||
90 | return 0; | ||
91 | Efault: | ||
92 | buf->error = -EFAULT; | ||
93 | return -EFAULT; | ||
94 | } | ||
95 | |||
96 | #undef NAME_OFFSET | ||
97 | |||
98 | int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) | ||
99 | { | ||
100 | struct fd arg; | ||
101 | struct hpux_dirent __user * lastdirent; | ||
102 | struct getdents_callback buf = { | ||
103 | .ctx.actor = filldir, | ||
104 | .current_dir = dirent, | ||
105 | .count = count | ||
106 | }; | ||
107 | int error; | ||
108 | |||
109 | arg = fdget(fd); | ||
110 | if (!arg.file) | ||
111 | return -EBADF; | ||
112 | |||
113 | error = iterate_dir(arg.file, &buf.ctx); | ||
114 | if (error >= 0) | ||
115 | error = buf.error; | ||
116 | lastdirent = buf.previous; | ||
117 | if (lastdirent) { | ||
118 | if (put_user(buf.ctx.pos, &lastdirent->d_off)) | ||
119 | error = -EFAULT; | ||
120 | else | ||
121 | error = count - buf.count; | ||
122 | } | ||
123 | |||
124 | fdput(arg); | ||
125 | return error; | ||
126 | } | ||
127 | |||
128 | int hpux_mount(const char *fs, const char *path, int mflag, | ||
129 | const char *fstype, const char *dataptr, int datalen) | ||
130 | { | ||
131 | return -ENOSYS; | ||
132 | } | ||
133 | |||
134 | static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf) | ||
135 | { | ||
136 | struct hpux_stat64 tmp; | ||
137 | |||
138 | /* we probably want a different split here - is hpux 12:20? */ | ||
139 | |||
140 | if (!new_valid_dev(stat->dev) || !new_valid_dev(stat->rdev)) | ||
141 | return -EOVERFLOW; | ||
142 | |||
143 | memset(&tmp, 0, sizeof(tmp)); | ||
144 | tmp.st_dev = new_encode_dev(stat->dev); | ||
145 | tmp.st_ino = stat->ino; | ||
146 | tmp.st_mode = stat->mode; | ||
147 | tmp.st_nlink = stat->nlink; | ||
148 | tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); | ||
149 | tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); | ||
150 | tmp.st_rdev = new_encode_dev(stat->rdev); | ||
151 | tmp.st_size = stat->size; | ||
152 | tmp.st_atime = stat->atime.tv_sec; | ||
153 | tmp.st_mtime = stat->mtime.tv_sec; | ||
154 | tmp.st_ctime = stat->ctime.tv_sec; | ||
155 | tmp.st_blocks = stat->blocks; | ||
156 | tmp.st_blksize = stat->blksize; | ||
157 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | ||
158 | } | ||
159 | |||
160 | long hpux_stat64(const char __user *filename, struct hpux_stat64 __user *statbuf) | ||
161 | { | ||
162 | struct kstat stat; | ||
163 | int error = vfs_stat(filename, &stat); | ||
164 | |||
165 | if (!error) | ||
166 | error = cp_hpux_stat(&stat, statbuf); | ||
167 | |||
168 | return error; | ||
169 | } | ||
170 | |||
171 | long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf) | ||
172 | { | ||
173 | struct kstat stat; | ||
174 | int error = vfs_fstat(fd, &stat); | ||
175 | |||
176 | if (!error) | ||
177 | error = cp_hpux_stat(&stat, statbuf); | ||
178 | |||
179 | return error; | ||
180 | } | ||
181 | |||
182 | long hpux_lstat64(const char __user *filename, | ||
183 | struct hpux_stat64 __user *statbuf) | ||
184 | { | ||
185 | struct kstat stat; | ||
186 | int error = vfs_lstat(filename, &stat); | ||
187 | |||
188 | if (!error) | ||
189 | error = cp_hpux_stat(&stat, statbuf); | ||
190 | |||
191 | return error; | ||
192 | } | ||
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S deleted file mode 100644 index 011468857e98..000000000000 --- a/arch/parisc/hpux/gate.S +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Linux/PARISC Project (http://www.parisc-linux.org/) | ||
4 | * | ||
5 | * System call entry code Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai> | ||
6 | * Licensed under the GNU GPL. | ||
7 | * thanks to Philipp Rumpf, Mike Shaver and various others | ||
8 | * sorry about the wall, puffin.. | ||
9 | */ | ||
10 | |||
11 | #include <asm/assembly.h> | ||
12 | #include <asm/asm-offsets.h> | ||
13 | #include <asm/unistd.h> | ||
14 | #include <asm/errno.h> | ||
15 | #include <linux/linkage.h> | ||
16 | |||
17 | .level LEVEL | ||
18 | .text | ||
19 | |||
20 | .import hpux_call_table | ||
21 | .import hpux_syscall_exit,code | ||
22 | |||
23 | .align PAGE_SIZE | ||
24 | ENTRY(hpux_gateway_page) | ||
25 | nop | ||
26 | #ifdef CONFIG_64BIT | ||
27 | #warning NEEDS WORK for 64-bit | ||
28 | #endif | ||
29 | ldw -64(%r30), %r29 ;! 8th argument | ||
30 | ldw -60(%r30), %r19 ;! 7th argument | ||
31 | ldw -56(%r30), %r20 ;! 6th argument | ||
32 | ldw -52(%r30), %r21 ;! 5th argument | ||
33 | gate .+8, %r0 /* become privileged */ | ||
34 | mtsp %r0,%sr4 /* get kernel space into sr4 */ | ||
35 | mtsp %r0,%sr5 /* get kernel space into sr5 */ | ||
36 | mtsp %r0,%sr6 /* get kernel space into sr6 */ | ||
37 | mfsp %sr7,%r1 /* save user sr7 */ | ||
38 | mtsp %r1,%sr3 /* and store it in sr3 */ | ||
39 | |||
40 | mtctl %r30,%cr28 | ||
41 | mfctl %cr30,%r1 | ||
42 | xor %r1,%r30,%r30 /* ye olde xor trick */ | ||
43 | xor %r1,%r30,%r1 | ||
44 | xor %r1,%r30,%r30 | ||
45 | ldo TASK_SZ_ALGN+FRAME_SIZE(%r30),%r30 /* set up kernel stack */ | ||
46 | |||
47 | /* N.B.: It is critical that we don't set sr7 to 0 until r30 | ||
48 | * contains a valid kernel stack pointer. It is also | ||
49 | * critical that we don't start using the kernel stack | ||
50 | * until after sr7 has been set to 0. | ||
51 | */ | ||
52 | |||
53 | mtsp %r0,%sr7 /* get kernel space into sr7 */ | ||
54 | STREG %r1,TASK_PT_GR30-TASK_SZ_ALGN-FRAME_SIZE(%r30) /* save usp */ | ||
55 | ldo -TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr in %r1 */ | ||
56 | |||
57 | /* Save some registers for sigcontext and potential task | ||
58 | switch (see entry.S for the details of which ones are | ||
59 | saved/restored). TASK_PT_PSW is zeroed so we can see whether | ||
60 | a process is on a syscall or not. For an interrupt the real | ||
61 | PSW value is stored. This is needed for gdb and sys_ptrace. */ | ||
62 | STREG %r0, TASK_PT_PSW(%r1) | ||
63 | STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */ | ||
64 | STREG %r19, TASK_PT_GR19(%r1) /* 7th argument */ | ||
65 | STREG %r20, TASK_PT_GR20(%r1) /* 6th argument */ | ||
66 | STREG %r21, TASK_PT_GR21(%r1) /* 5th argument */ | ||
67 | STREG %r22, TASK_PT_GR22(%r1) /* syscall # */ | ||
68 | STREG %r23, TASK_PT_GR23(%r1) /* 4th argument */ | ||
69 | STREG %r24, TASK_PT_GR24(%r1) /* 3rd argument */ | ||
70 | STREG %r25, TASK_PT_GR25(%r1) /* 2nd argument */ | ||
71 | STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ | ||
72 | STREG %r27, TASK_PT_GR27(%r1) /* user dp */ | ||
73 | STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ | ||
74 | STREG %r0, TASK_PT_ORIG_R28(%r1) /* don't prohibit restarts */ | ||
75 | STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */ | ||
76 | STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ | ||
77 | |||
78 | ldo TASK_PT_FR0(%r1), %r27 /* save fpregs from the kernel */ | ||
79 | save_fp %r27 /* or potential task switch */ | ||
80 | |||
81 | mfctl %cr11, %r27 /* i.e. SAR */ | ||
82 | STREG %r27, TASK_PT_SAR(%r1) | ||
83 | |||
84 | loadgp | ||
85 | |||
86 | stw %r21, -52(%r30) ;! 5th argument | ||
87 | stw %r20, -56(%r30) ;! 6th argument | ||
88 | stw %r19, -60(%r30) ;! 7th argument | ||
89 | stw %r29, -64(%r30) ;! 8th argument | ||
90 | |||
91 | ldil L%hpux_call_table, %r21 | ||
92 | ldo R%hpux_call_table(%r21), %r21 | ||
93 | comiclr,>>= __NR_HPUX_syscalls, %r22, %r0 | ||
94 | b,n syscall_nosys | ||
95 | LDREGX %r22(%r21), %r21 | ||
96 | ldil L%hpux_syscall_exit,%r2 | ||
97 | be 0(%sr7,%r21) | ||
98 | ldo R%hpux_syscall_exit(%r2),%r2 | ||
99 | |||
100 | syscall_nosys: | ||
101 | ldil L%hpux_syscall_exit,%r1 | ||
102 | be R%hpux_syscall_exit(%sr7,%r1) | ||
103 | ldo -ENOSYS(%r0),%r28 | ||
104 | ENDPROC(hpux_gateway_page) | ||
105 | |||
106 | .align PAGE_SIZE | ||
107 | ENTRY(end_hpux_gateway_page) | ||
diff --git a/arch/parisc/hpux/ioctl.c b/arch/parisc/hpux/ioctl.c deleted file mode 100644 index dede4765852e..000000000000 --- a/arch/parisc/hpux/ioctl.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * Implements some necessary HPUX ioctls. | ||
3 | * | ||
4 | * Copyright (C) 1999-2002 Matthew Wilcox <willy with parisc-linux.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | /* | ||
22 | * Supported ioctls: | ||
23 | * TCGETA | ||
24 | * TCSETA | ||
25 | * TCSETAW | ||
26 | * TCSETAF | ||
27 | * TCSBRK | ||
28 | * TCXONC | ||
29 | * TCFLSH | ||
30 | * TIOCGWINSZ | ||
31 | * TIOCSWINSZ | ||
32 | * TIOCGPGRP | ||
33 | * TIOCSPGRP | ||
34 | */ | ||
35 | |||
36 | #include <linux/sched.h> | ||
37 | #include <linux/syscalls.h> | ||
38 | #include <asm/errno.h> | ||
39 | #include <asm/ioctl.h> | ||
40 | #include <asm/termios.h> | ||
41 | #include <asm/uaccess.h> | ||
42 | |||
43 | static int hpux_ioctl_t(int fd, unsigned long cmd, unsigned long arg) | ||
44 | { | ||
45 | int result = -EOPNOTSUPP; | ||
46 | int nr = _IOC_NR(cmd); | ||
47 | switch (nr) { | ||
48 | case 106: | ||
49 | result = sys_ioctl(fd, TIOCSWINSZ, arg); | ||
50 | break; | ||
51 | case 107: | ||
52 | result = sys_ioctl(fd, TIOCGWINSZ, arg); | ||
53 | break; | ||
54 | } | ||
55 | return result; | ||
56 | } | ||
57 | |||
58 | int hpux_ioctl(int fd, unsigned long cmd, unsigned long arg) | ||
59 | { | ||
60 | int result = -EOPNOTSUPP; | ||
61 | int type = _IOC_TYPE(cmd); | ||
62 | switch (type) { | ||
63 | case 'T': | ||
64 | /* Our structures are now compatible with HPUX's */ | ||
65 | result = sys_ioctl(fd, cmd, arg); | ||
66 | break; | ||
67 | case 't': | ||
68 | result = hpux_ioctl_t(fd, cmd, arg); | ||
69 | break; | ||
70 | } | ||
71 | return result; | ||
72 | } | ||
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c deleted file mode 100644 index e5c4da035810..000000000000 --- a/arch/parisc/hpux/sys_hpux.c +++ /dev/null | |||
@@ -1,963 +0,0 @@ | |||
1 | /* | ||
2 | * Implements HPUX syscalls. | ||
3 | * | ||
4 | * Copyright (C) 1999 Matthew Wilcox <willy with parisc-linux.org> | ||
5 | * Copyright (C) 2000 Philipp Rumpf | ||
6 | * Copyright (C) 2000 John Marvin <jsm with parisc-linux.org> | ||
7 | * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> | ||
8 | * Copyright (C) 2001 Nathan Neulinger <nneul at umr.edu> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | */ | ||
24 | |||
25 | #include <linux/capability.h> | ||
26 | #include <linux/file.h> | ||
27 | #include <linux/fs.h> | ||
28 | #include <linux/namei.h> | ||
29 | #include <linux/sched.h> | ||
30 | #include <linux/slab.h> | ||
31 | #include <linux/syscalls.h> | ||
32 | #include <linux/utsname.h> | ||
33 | #include <linux/vfs.h> | ||
34 | #include <linux/vmalloc.h> | ||
35 | |||
36 | #include <asm/errno.h> | ||
37 | #include <asm/pgalloc.h> | ||
38 | #include <asm/uaccess.h> | ||
39 | |||
40 | unsigned long hpux_brk(unsigned long addr) | ||
41 | { | ||
42 | /* Sigh. Looks like HP/UX libc relies on kernel bugs. */ | ||
43 | return sys_brk(addr + PAGE_SIZE); | ||
44 | } | ||
45 | |||
46 | int hpux_sbrk(void) | ||
47 | { | ||
48 | return -ENOSYS; | ||
49 | } | ||
50 | |||
51 | /* Random other syscalls */ | ||
52 | |||
53 | int hpux_nice(int priority_change) | ||
54 | { | ||
55 | return -ENOSYS; | ||
56 | } | ||
57 | |||
58 | int hpux_ptrace(void) | ||
59 | { | ||
60 | return -ENOSYS; | ||
61 | } | ||
62 | |||
63 | int hpux_wait(int __user *stat_loc) | ||
64 | { | ||
65 | return sys_waitpid(-1, stat_loc, 0); | ||
66 | } | ||
67 | |||
68 | int hpux_setpgrp(void) | ||
69 | { | ||
70 | return sys_setpgid(0,0); | ||
71 | } | ||
72 | |||
73 | int hpux_setpgrp3(void) | ||
74 | { | ||
75 | return hpux_setpgrp(); | ||
76 | } | ||
77 | |||
78 | #define _SC_CPU_VERSION 10001 | ||
79 | #define _SC_OPEN_MAX 4 | ||
80 | #define CPU_PA_RISC1_1 0x210 | ||
81 | |||
82 | int hpux_sysconf(int which) | ||
83 | { | ||
84 | switch (which) { | ||
85 | case _SC_CPU_VERSION: | ||
86 | return CPU_PA_RISC1_1; | ||
87 | case _SC_OPEN_MAX: | ||
88 | return INT_MAX; | ||
89 | default: | ||
90 | return -EINVAL; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | /*****************************************************************************/ | ||
95 | |||
96 | #define HPUX_UTSLEN 9 | ||
97 | #define HPUX_SNLEN 15 | ||
98 | |||
99 | struct hpux_utsname { | ||
100 | char sysname[HPUX_UTSLEN]; | ||
101 | char nodename[HPUX_UTSLEN]; | ||
102 | char release[HPUX_UTSLEN]; | ||
103 | char version[HPUX_UTSLEN]; | ||
104 | char machine[HPUX_UTSLEN]; | ||
105 | char idnumber[HPUX_SNLEN]; | ||
106 | } ; | ||
107 | |||
108 | struct hpux_ustat { | ||
109 | int32_t f_tfree; /* total free (daddr_t) */ | ||
110 | u_int32_t f_tinode; /* total inodes free (ino_t) */ | ||
111 | char f_fname[6]; /* filsys name */ | ||
112 | char f_fpack[6]; /* filsys pack name */ | ||
113 | u_int32_t f_blksize; /* filsys block size (int) */ | ||
114 | }; | ||
115 | |||
116 | /* | ||
117 | * HPUX's utssys() call. It's a collection of miscellaneous functions, | ||
118 | * alas, so there's no nice way of splitting them up. | ||
119 | */ | ||
120 | |||
121 | /* This function is called from hpux_utssys(); HP-UX implements | ||
122 | * ustat() as an option to utssys(). | ||
123 | * | ||
124 | * Now, struct ustat on HP-UX is exactly the same as on Linux, except | ||
125 | * that it contains one addition field on the end, int32_t f_blksize. | ||
126 | * So, we could have written this function to just call the Linux | ||
127 | * sys_ustat(), (defined in linux/fs/super.c), and then just | ||
128 | * added this additional field to the user's structure. But I figure | ||
129 | * if we're gonna be digging through filesystem structures to get | ||
130 | * this, we might as well just do the whole enchilada all in one go. | ||
131 | * | ||
132 | * So, most of this function is almost identical to sys_ustat(). | ||
133 | * I have placed comments at the few lines changed or added, to | ||
134 | * aid in porting forward if and when sys_ustat() is changed from | ||
135 | * its form in kernel 2.2.5. | ||
136 | */ | ||
137 | static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) | ||
138 | { | ||
139 | struct hpux_ustat tmp; /* Changed to hpux_ustat */ | ||
140 | struct kstatfs sbuf; | ||
141 | int err = vfs_ustat(dev, &sbuf); | ||
142 | if (err) | ||
143 | goto out; | ||
144 | |||
145 | memset(&tmp,0,sizeof(tmp)); | ||
146 | |||
147 | tmp.f_tfree = (int32_t)sbuf.f_bfree; | ||
148 | tmp.f_tinode = (u_int32_t)sbuf.f_ffree; | ||
149 | tmp.f_blksize = (u_int32_t)sbuf.f_bsize; /* Added this line */ | ||
150 | |||
151 | err = copy_to_user(ubuf, &tmp, sizeof(tmp)) ? -EFAULT : 0; | ||
152 | out: | ||
153 | return err; | ||
154 | } | ||
155 | |||
156 | /* | ||
157 | * Wrapper for hpux statfs call. At the moment, just calls the linux native one | ||
158 | * and ignores the extra fields at the end of the hpux statfs struct. | ||
159 | * | ||
160 | */ | ||
161 | |||
162 | typedef int32_t hpux_fsid_t[2]; /* file system ID type */ | ||
163 | typedef uint16_t hpux_site_t; | ||
164 | |||
165 | struct hpux_statfs { | ||
166 | int32_t f_type; /* type of info, zero for now */ | ||
167 | int32_t f_bsize; /* fundamental file system block size */ | ||
168 | int32_t f_blocks; /* total blocks in file system */ | ||
169 | int32_t f_bfree; /* free block in fs */ | ||
170 | int32_t f_bavail; /* free blocks avail to non-superuser */ | ||
171 | int32_t f_files; /* total file nodes in file system */ | ||
172 | int32_t f_ffree; /* free file nodes in fs */ | ||
173 | hpux_fsid_t f_fsid; /* file system ID */ | ||
174 | int32_t f_magic; /* file system magic number */ | ||
175 | int32_t f_featurebits; /* file system features */ | ||
176 | int32_t f_spare[4]; /* spare for later */ | ||
177 | hpux_site_t f_cnode; /* cluster node where mounted */ | ||
178 | int16_t f_pad; | ||
179 | }; | ||
180 | |||
181 | static int do_statfs_hpux(struct kstatfs *st, struct hpux_statfs __user *p) | ||
182 | { | ||
183 | struct hpux_statfs buf; | ||
184 | memset(&buf, 0, sizeof(buf)); | ||
185 | buf.f_type = st->f_type; | ||
186 | buf.f_bsize = st->f_bsize; | ||
187 | buf.f_blocks = st->f_blocks; | ||
188 | buf.f_bfree = st->f_bfree; | ||
189 | buf.f_bavail = st->f_bavail; | ||
190 | buf.f_files = st->f_files; | ||
191 | buf.f_ffree = st->f_ffree; | ||
192 | buf.f_fsid[0] = st->f_fsid.val[0]; | ||
193 | buf.f_fsid[1] = st->f_fsid.val[1]; | ||
194 | if (copy_to_user(p, &buf, sizeof(buf))) | ||
195 | return -EFAULT; | ||
196 | return 0; | ||
197 | } | ||
198 | |||
199 | /* hpux statfs */ | ||
200 | asmlinkage long hpux_statfs(const char __user *pathname, | ||
201 | struct hpux_statfs __user *buf) | ||
202 | { | ||
203 | struct kstatfs st; | ||
204 | int error = user_statfs(pathname, &st); | ||
205 | if (!error) | ||
206 | error = do_statfs_hpux(&st, buf); | ||
207 | return error; | ||
208 | } | ||
209 | |||
210 | asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) | ||
211 | { | ||
212 | struct kstatfs st; | ||
213 | int error = fd_statfs(fd, &st); | ||
214 | if (!error) | ||
215 | error = do_statfs_hpux(&st, buf); | ||
216 | return error; | ||
217 | } | ||
218 | |||
219 | |||
220 | /* This function is called from hpux_utssys(); HP-UX implements | ||
221 | * uname() as an option to utssys(). | ||
222 | * | ||
223 | * The form of this function is pretty much copied from sys_olduname(), | ||
224 | * defined in linux/arch/i386/kernel/sys_i386.c. | ||
225 | */ | ||
226 | /* TODO: Are these put_user calls OK? Should they pass an int? | ||
227 | * (I copied it from sys_i386.c like this.) | ||
228 | */ | ||
229 | static int hpux_uname(struct hpux_utsname __user *name) | ||
230 | { | ||
231 | int error; | ||
232 | |||
233 | if (!name) | ||
234 | return -EFAULT; | ||
235 | if (!access_ok(VERIFY_WRITE,name,sizeof(struct hpux_utsname))) | ||
236 | return -EFAULT; | ||
237 | |||
238 | down_read(&uts_sem); | ||
239 | |||
240 | error = __copy_to_user(&name->sysname, &utsname()->sysname, | ||
241 | HPUX_UTSLEN - 1); | ||
242 | error |= __put_user(0, name->sysname + HPUX_UTSLEN - 1); | ||
243 | error |= __copy_to_user(&name->nodename, &utsname()->nodename, | ||
244 | HPUX_UTSLEN - 1); | ||
245 | error |= __put_user(0, name->nodename + HPUX_UTSLEN - 1); | ||
246 | error |= __copy_to_user(&name->release, &utsname()->release, | ||
247 | HPUX_UTSLEN - 1); | ||
248 | error |= __put_user(0, name->release + HPUX_UTSLEN - 1); | ||
249 | error |= __copy_to_user(&name->version, &utsname()->version, | ||
250 | HPUX_UTSLEN - 1); | ||
251 | error |= __put_user(0, name->version + HPUX_UTSLEN - 1); | ||
252 | error |= __copy_to_user(&name->machine, &utsname()->machine, | ||
253 | HPUX_UTSLEN - 1); | ||
254 | error |= __put_user(0, name->machine + HPUX_UTSLEN - 1); | ||
255 | |||
256 | up_read(&uts_sem); | ||
257 | |||
258 | /* HP-UX utsname has no domainname field. */ | ||
259 | |||
260 | /* TODO: Implement idnumber!!! */ | ||
261 | #if 0 | ||
262 | error |= __put_user(0,name->idnumber); | ||
263 | error |= __put_user(0,name->idnumber+HPUX_SNLEN-1); | ||
264 | #endif | ||
265 | |||
266 | error = error ? -EFAULT : 0; | ||
267 | |||
268 | return error; | ||
269 | } | ||
270 | |||
271 | /* Note: HP-UX just uses the old suser() function to check perms | ||
272 | * in this system call. We'll use capable(CAP_SYS_ADMIN). | ||
273 | */ | ||
274 | int hpux_utssys(char __user *ubuf, int n, int type) | ||
275 | { | ||
276 | int len; | ||
277 | int error; | ||
278 | switch( type ) { | ||
279 | case 0: | ||
280 | /* uname(): */ | ||
281 | return hpux_uname((struct hpux_utsname __user *)ubuf); | ||
282 | break ; | ||
283 | case 1: | ||
284 | /* Obsolete (used to be umask().) */ | ||
285 | return -EFAULT ; | ||
286 | break ; | ||
287 | case 2: | ||
288 | /* ustat(): */ | ||
289 | return hpux_ustat(new_decode_dev(n), | ||
290 | (struct hpux_ustat __user *)ubuf); | ||
291 | break; | ||
292 | case 3: | ||
293 | /* setuname(): | ||
294 | * | ||
295 | * On linux (unlike HP-UX), utsname.nodename | ||
296 | * is the same as the hostname. | ||
297 | * | ||
298 | * sys_sethostname() is defined in linux/kernel/sys.c. | ||
299 | */ | ||
300 | if (!capable(CAP_SYS_ADMIN)) | ||
301 | return -EPERM; | ||
302 | /* Unlike Linux, HP-UX returns an error if n==0: */ | ||
303 | if ( n <= 0 ) | ||
304 | return -EINVAL ; | ||
305 | /* Unlike Linux, HP-UX truncates it if n is too big: */ | ||
306 | len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; | ||
307 | return sys_sethostname(ubuf, len); | ||
308 | break ; | ||
309 | case 4: | ||
310 | /* sethostname(): | ||
311 | * | ||
312 | * sys_sethostname() is defined in linux/kernel/sys.c. | ||
313 | */ | ||
314 | if (!capable(CAP_SYS_ADMIN)) | ||
315 | return -EPERM; | ||
316 | /* Unlike Linux, HP-UX returns an error if n==0: */ | ||
317 | if ( n <= 0 ) | ||
318 | return -EINVAL ; | ||
319 | /* Unlike Linux, HP-UX truncates it if n is too big: */ | ||
320 | len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; | ||
321 | return sys_sethostname(ubuf, len); | ||
322 | break ; | ||
323 | case 5: | ||
324 | /* gethostname(): | ||
325 | * | ||
326 | * sys_gethostname() is defined in linux/kernel/sys.c. | ||
327 | */ | ||
328 | /* Unlike Linux, HP-UX returns an error if n==0: */ | ||
329 | if ( n <= 0 ) | ||
330 | return -EINVAL ; | ||
331 | return sys_gethostname(ubuf, n); | ||
332 | break ; | ||
333 | case 6: | ||
334 | /* Supposedly called from setuname() in libc. | ||
335 | * TODO: When and why is this called? | ||
336 | * Is it ever even called? | ||
337 | * | ||
338 | * This code should look a lot like sys_sethostname(), | ||
339 | * defined in linux/kernel/sys.c. If that gets updated, | ||
340 | * update this code similarly. | ||
341 | */ | ||
342 | if (!capable(CAP_SYS_ADMIN)) | ||
343 | return -EPERM; | ||
344 | /* Unlike Linux, HP-UX returns an error if n==0: */ | ||
345 | if ( n <= 0 ) | ||
346 | return -EINVAL ; | ||
347 | /* Unlike Linux, HP-UX truncates it if n is too big: */ | ||
348 | len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; | ||
349 | /**/ | ||
350 | /* TODO: print a warning about using this? */ | ||
351 | down_write(&uts_sem); | ||
352 | error = -EFAULT; | ||
353 | if (!copy_from_user(utsname()->sysname, ubuf, len)) { | ||
354 | utsname()->sysname[len] = 0; | ||
355 | error = 0; | ||
356 | } | ||
357 | up_write(&uts_sem); | ||
358 | return error; | ||
359 | break ; | ||
360 | case 7: | ||
361 | /* Sets utsname.release, if you're allowed. | ||
362 | * Undocumented. Used by swinstall to change the | ||
363 | * OS version, during OS updates. Yuck!!! | ||
364 | * | ||
365 | * This code should look a lot like sys_sethostname() | ||
366 | * in linux/kernel/sys.c. If that gets updated, update | ||
367 | * this code similarly. | ||
368 | */ | ||
369 | if (!capable(CAP_SYS_ADMIN)) | ||
370 | return -EPERM; | ||
371 | /* Unlike Linux, HP-UX returns an error if n==0: */ | ||
372 | if ( n <= 0 ) | ||
373 | return -EINVAL ; | ||
374 | /* Unlike Linux, HP-UX truncates it if n is too big: */ | ||
375 | len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; | ||
376 | /**/ | ||
377 | /* TODO: print a warning about this? */ | ||
378 | down_write(&uts_sem); | ||
379 | error = -EFAULT; | ||
380 | if (!copy_from_user(utsname()->release, ubuf, len)) { | ||
381 | utsname()->release[len] = 0; | ||
382 | error = 0; | ||
383 | } | ||
384 | up_write(&uts_sem); | ||
385 | return error; | ||
386 | break ; | ||
387 | default: | ||
388 | /* This system call returns -EFAULT if given an unknown type. | ||
389 | * Why not -EINVAL? I don't know, it's just not what they did. | ||
390 | */ | ||
391 | return -EFAULT ; | ||
392 | } | ||
393 | } | ||
394 | |||
395 | int hpux_getdomainname(char __user *name, int len) | ||
396 | { | ||
397 | int nlen; | ||
398 | int err = -EFAULT; | ||
399 | |||
400 | down_read(&uts_sem); | ||
401 | |||
402 | nlen = strlen(utsname()->domainname) + 1; | ||
403 | |||
404 | if (nlen < len) | ||
405 | len = nlen; | ||
406 | if(len > __NEW_UTS_LEN) | ||
407 | goto done; | ||
408 | if(copy_to_user(name, utsname()->domainname, len)) | ||
409 | goto done; | ||
410 | err = 0; | ||
411 | done: | ||
412 | up_read(&uts_sem); | ||
413 | return err; | ||
414 | |||
415 | } | ||
416 | |||
417 | int hpux_pipe(int *kstack_fildes) | ||
418 | { | ||
419 | return do_pipe_flags(kstack_fildes, 0); | ||
420 | } | ||
421 | |||
422 | /* lies - says it works, but it really didn't lock anything */ | ||
423 | int hpux_lockf(int fildes, int function, off_t size) | ||
424 | { | ||
425 | return 0; | ||
426 | } | ||
427 | |||
428 | int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) | ||
429 | { | ||
430 | char *fsname = NULL; | ||
431 | int len = 0; | ||
432 | int fstype; | ||
433 | |||
434 | /*Unimplemented HP-UX syscall emulation. Syscall #334 (sysfs) | ||
435 | Args: 1 80057bf4 0 400179f0 0 0 0 */ | ||
436 | printk(KERN_DEBUG "in hpux_sysfs\n"); | ||
437 | printk(KERN_DEBUG "hpux_sysfs called with opcode = %d\n", opcode); | ||
438 | printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1); | ||
439 | |||
440 | if ( opcode == 1 ) { /* GETFSIND */ | ||
441 | char __user *user_fsname = (char __user *)arg1; | ||
442 | len = strlen_user(user_fsname); | ||
443 | printk(KERN_DEBUG "len of arg1 = %d\n", len); | ||
444 | if (len == 0) | ||
445 | return 0; | ||
446 | fsname = kmalloc(len, GFP_KERNEL); | ||
447 | if (!fsname) { | ||
448 | printk(KERN_DEBUG "failed to kmalloc fsname\n"); | ||
449 | return 0; | ||
450 | } | ||
451 | |||
452 | if (copy_from_user(fsname, user_fsname, len)) { | ||
453 | printk(KERN_DEBUG "failed to copy_from_user fsname\n"); | ||
454 | kfree(fsname); | ||
455 | return 0; | ||
456 | } | ||
457 | |||
458 | /* String could be altered by userspace after strlen_user() */ | ||
459 | fsname[len - 1] = '\0'; | ||
460 | |||
461 | printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname); | ||
462 | if ( !strcmp(fsname, "hfs") ) { | ||
463 | fstype = 0; | ||
464 | } else { | ||
465 | fstype = 0; | ||
466 | } | ||
467 | |||
468 | kfree(fsname); | ||
469 | |||
470 | printk(KERN_DEBUG "returning fstype=%d\n", fstype); | ||
471 | return fstype; /* something other than default */ | ||
472 | } | ||
473 | |||
474 | |||
475 | return 0; | ||
476 | } | ||
477 | |||
478 | |||
479 | /* Table of syscall names and handle for unimplemented routines */ | ||
480 | static const char * const syscall_names[] = { | ||
481 | "nosys", /* 0 */ | ||
482 | "exit", | ||
483 | "fork", | ||
484 | "read", | ||
485 | "write", | ||
486 | "open", /* 5 */ | ||
487 | "close", | ||
488 | "wait", | ||
489 | "creat", | ||
490 | "link", | ||
491 | "unlink", /* 10 */ | ||
492 | "execv", | ||
493 | "chdir", | ||
494 | "time", | ||
495 | "mknod", | ||
496 | "chmod", /* 15 */ | ||
497 | "chown", | ||
498 | "brk", | ||
499 | "lchmod", | ||
500 | "lseek", | ||
501 | "getpid", /* 20 */ | ||
502 | "mount", | ||
503 | "umount", | ||
504 | "setuid", | ||
505 | "getuid", | ||
506 | "stime", /* 25 */ | ||
507 | "ptrace", | ||
508 | "alarm", | ||
509 | NULL, | ||
510 | "pause", | ||
511 | "utime", /* 30 */ | ||
512 | "stty", | ||
513 | "gtty", | ||
514 | "access", | ||
515 | "nice", | ||
516 | "ftime", /* 35 */ | ||
517 | "sync", | ||
518 | "kill", | ||
519 | "stat", | ||
520 | "setpgrp3", | ||
521 | "lstat", /* 40 */ | ||
522 | "dup", | ||
523 | "pipe", | ||
524 | "times", | ||
525 | "profil", | ||
526 | "ki_call", /* 45 */ | ||
527 | "setgid", | ||
528 | "getgid", | ||
529 | NULL, | ||
530 | NULL, | ||
531 | NULL, /* 50 */ | ||
532 | "acct", | ||
533 | "set_userthreadid", | ||
534 | NULL, | ||
535 | "ioctl", | ||
536 | "reboot", /* 55 */ | ||
537 | "symlink", | ||
538 | "utssys", | ||
539 | "readlink", | ||
540 | "execve", | ||
541 | "umask", /* 60 */ | ||
542 | "chroot", | ||
543 | "fcntl", | ||
544 | "ulimit", | ||
545 | NULL, | ||
546 | NULL, /* 65 */ | ||
547 | "vfork", | ||
548 | NULL, | ||
549 | NULL, | ||
550 | NULL, | ||
551 | NULL, /* 70 */ | ||
552 | "mmap", | ||
553 | NULL, | ||
554 | "munmap", | ||
555 | "mprotect", | ||
556 | "madvise", /* 75 */ | ||
557 | "vhangup", | ||
558 | "swapoff", | ||
559 | NULL, | ||
560 | "getgroups", | ||
561 | "setgroups", /* 80 */ | ||
562 | "getpgrp2", | ||
563 | "setpgid/setpgrp2", | ||
564 | "setitimer", | ||
565 | "wait3", | ||
566 | "swapon", /* 85 */ | ||
567 | "getitimer", | ||
568 | NULL, | ||
569 | NULL, | ||
570 | NULL, | ||
571 | "dup2", /* 90 */ | ||
572 | NULL, | ||
573 | "fstat", | ||
574 | "select", | ||
575 | NULL, | ||
576 | "fsync", /* 95 */ | ||
577 | "setpriority", | ||
578 | NULL, | ||
579 | NULL, | ||
580 | NULL, | ||
581 | "getpriority", /* 100 */ | ||
582 | NULL, | ||
583 | NULL, | ||
584 | NULL, | ||
585 | NULL, | ||
586 | NULL, /* 105 */ | ||
587 | NULL, | ||
588 | NULL, | ||
589 | "sigvector", | ||
590 | "sigblock", | ||
591 | "sigsetmask", /* 110 */ | ||
592 | "sigpause", | ||
593 | "sigstack", | ||
594 | NULL, | ||
595 | NULL, | ||
596 | NULL, /* 115 */ | ||
597 | "gettimeofday", | ||
598 | "getrusage", | ||
599 | NULL, | ||
600 | NULL, | ||
601 | "readv", /* 120 */ | ||
602 | "writev", | ||
603 | "settimeofday", | ||
604 | "fchown", | ||
605 | "fchmod", | ||
606 | NULL, /* 125 */ | ||
607 | "setresuid", | ||
608 | "setresgid", | ||
609 | "rename", | ||
610 | "truncate", | ||
611 | "ftruncate", /* 130 */ | ||
612 | NULL, | ||
613 | "sysconf", | ||
614 | NULL, | ||
615 | NULL, | ||
616 | NULL, /* 135 */ | ||
617 | "mkdir", | ||
618 | "rmdir", | ||
619 | NULL, | ||
620 | "sigcleanup", | ||
621 | "setcore", /* 140 */ | ||
622 | NULL, | ||
623 | "gethostid", | ||
624 | "sethostid", | ||
625 | "getrlimit", | ||
626 | "setrlimit", /* 145 */ | ||
627 | NULL, | ||
628 | NULL, | ||
629 | "quotactl", | ||
630 | "get_sysinfo", | ||
631 | NULL, /* 150 */ | ||
632 | "privgrp", | ||
633 | "rtprio", | ||
634 | "plock", | ||
635 | NULL, | ||
636 | "lockf", /* 155 */ | ||
637 | "semget", | ||
638 | NULL, | ||
639 | "semop", | ||
640 | "msgget", | ||
641 | NULL, /* 160 */ | ||
642 | "msgsnd", | ||
643 | "msgrcv", | ||
644 | "shmget", | ||
645 | NULL, | ||
646 | "shmat", /* 165 */ | ||
647 | "shmdt", | ||
648 | NULL, | ||
649 | "csp/nsp_init", | ||
650 | "cluster", | ||
651 | "mkrnod", /* 170 */ | ||
652 | "test", | ||
653 | "unsp_open", | ||
654 | NULL, | ||
655 | "getcontext", | ||
656 | "osetcontext", /* 175 */ | ||
657 | "bigio", | ||
658 | "pipenode", | ||
659 | "lsync", | ||
660 | "getmachineid", | ||
661 | "cnodeid/mysite", /* 180 */ | ||
662 | "cnodes/sitels", | ||
663 | "swapclients", | ||
664 | "rmtprocess", | ||
665 | "dskless_stats", | ||
666 | "sigprocmask", /* 185 */ | ||
667 | "sigpending", | ||
668 | "sigsuspend", | ||
669 | "sigaction", | ||
670 | NULL, | ||
671 | "nfssvc", /* 190 */ | ||
672 | "getfh", | ||
673 | "getdomainname", | ||
674 | "setdomainname", | ||
675 | "async_daemon", | ||
676 | "getdirentries", /* 195 */ | ||
677 | NULL, | ||
678 | NULL, | ||
679 | "vfsmount", | ||
680 | NULL, | ||
681 | "waitpid", /* 200 */ | ||
682 | NULL, | ||
683 | NULL, | ||
684 | NULL, | ||
685 | NULL, | ||
686 | NULL, /* 205 */ | ||
687 | NULL, | ||
688 | NULL, | ||
689 | NULL, | ||
690 | NULL, | ||
691 | NULL, /* 210 */ | ||
692 | NULL, | ||
693 | NULL, | ||
694 | NULL, | ||
695 | NULL, | ||
696 | NULL, /* 215 */ | ||
697 | NULL, | ||
698 | NULL, | ||
699 | NULL, | ||
700 | NULL, | ||
701 | NULL, /* 220 */ | ||
702 | NULL, | ||
703 | NULL, | ||
704 | NULL, | ||
705 | "sigsetreturn", | ||
706 | "sigsetstatemask", /* 225 */ | ||
707 | "bfactl", | ||
708 | "cs", | ||
709 | "cds", | ||
710 | NULL, | ||
711 | "pathconf", /* 230 */ | ||
712 | "fpathconf", | ||
713 | NULL, | ||
714 | NULL, | ||
715 | "nfs_fcntl", | ||
716 | "ogetacl", /* 235 */ | ||
717 | "ofgetacl", | ||
718 | "osetacl", | ||
719 | "ofsetacl", | ||
720 | "pstat", | ||
721 | "getaudid", /* 240 */ | ||
722 | "setaudid", | ||
723 | "getaudproc", | ||
724 | "setaudproc", | ||
725 | "getevent", | ||
726 | "setevent", /* 245 */ | ||
727 | "audwrite", | ||
728 | "audswitch", | ||
729 | "audctl", | ||
730 | "ogetaccess", | ||
731 | "fsctl", /* 250 */ | ||
732 | "ulconnect", | ||
733 | "ulcontrol", | ||
734 | "ulcreate", | ||
735 | "uldest", | ||
736 | "ulrecv", /* 255 */ | ||
737 | "ulrecvcn", | ||
738 | "ulsend", | ||
739 | "ulshutdown", | ||
740 | "swapfs", | ||
741 | "fss", /* 260 */ | ||
742 | NULL, | ||
743 | NULL, | ||
744 | NULL, | ||
745 | NULL, | ||
746 | NULL, /* 265 */ | ||
747 | NULL, | ||
748 | "tsync", | ||
749 | "getnumfds", | ||
750 | "poll", | ||
751 | "getmsg", /* 270 */ | ||
752 | "putmsg", | ||
753 | "fchdir", | ||
754 | "getmount_cnt", | ||
755 | "getmount_entry", | ||
756 | "accept", /* 275 */ | ||
757 | "bind", | ||
758 | "connect", | ||
759 | "getpeername", | ||
760 | "getsockname", | ||
761 | "getsockopt", /* 280 */ | ||
762 | "listen", | ||
763 | "recv", | ||
764 | "recvfrom", | ||
765 | "recvmsg", | ||
766 | "send", /* 285 */ | ||
767 | "sendmsg", | ||
768 | "sendto", | ||
769 | "setsockopt", | ||
770 | "shutdown", | ||
771 | "socket", /* 290 */ | ||
772 | "socketpair", | ||
773 | "proc_open", | ||
774 | "proc_close", | ||
775 | "proc_send", | ||
776 | "proc_recv", /* 295 */ | ||
777 | "proc_sendrecv", | ||
778 | "proc_syscall", | ||
779 | "ipccreate", | ||
780 | "ipcname", | ||
781 | "ipcnamerase", /* 300 */ | ||
782 | "ipclookup", | ||
783 | "ipcselect", | ||
784 | "ipcconnect", | ||
785 | "ipcrecvcn", | ||
786 | "ipcsend", /* 305 */ | ||
787 | "ipcrecv", | ||
788 | "ipcgetnodename", | ||
789 | "ipcsetnodename", | ||
790 | "ipccontrol", | ||
791 | "ipcshutdown", /* 310 */ | ||
792 | "ipcdest", | ||
793 | "semctl", | ||
794 | "msgctl", | ||
795 | "shmctl", | ||
796 | "mpctl", /* 315 */ | ||
797 | "exportfs", | ||
798 | "getpmsg", | ||
799 | "putpmsg", | ||
800 | "strioctl", | ||
801 | "msync", /* 320 */ | ||
802 | "msleep", | ||
803 | "mwakeup", | ||
804 | "msem_init", | ||
805 | "msem_remove", | ||
806 | "adjtime", /* 325 */ | ||
807 | "kload", | ||
808 | "fattach", | ||
809 | "fdetach", | ||
810 | "serialize", | ||
811 | "statvfs", /* 330 */ | ||
812 | "fstatvfs", | ||
813 | "lchown", | ||
814 | "getsid", | ||
815 | "sysfs", | ||
816 | NULL, /* 335 */ | ||
817 | NULL, | ||
818 | "sched_setparam", | ||
819 | "sched_getparam", | ||
820 | "sched_setscheduler", | ||
821 | "sched_getscheduler", /* 340 */ | ||
822 | "sched_yield", | ||
823 | "sched_get_priority_max", | ||
824 | "sched_get_priority_min", | ||
825 | "sched_rr_get_interval", | ||
826 | "clock_settime", /* 345 */ | ||
827 | "clock_gettime", | ||
828 | "clock_getres", | ||
829 | "timer_create", | ||
830 | "timer_delete", | ||
831 | "timer_settime", /* 350 */ | ||
832 | "timer_gettime", | ||
833 | "timer_getoverrun", | ||
834 | "nanosleep", | ||
835 | "toolbox", | ||
836 | NULL, /* 355 */ | ||
837 | "getdents", | ||
838 | "getcontext", | ||
839 | "sysinfo", | ||
840 | "fcntl64", | ||
841 | "ftruncate64", /* 360 */ | ||
842 | "fstat64", | ||
843 | "getdirentries64", | ||
844 | "getrlimit64", | ||
845 | "lockf64", | ||
846 | "lseek64", /* 365 */ | ||
847 | "lstat64", | ||
848 | "mmap64", | ||
849 | "setrlimit64", | ||
850 | "stat64", | ||
851 | "truncate64", /* 370 */ | ||
852 | "ulimit64", | ||
853 | NULL, | ||
854 | NULL, | ||
855 | NULL, | ||
856 | NULL, /* 375 */ | ||
857 | NULL, | ||
858 | NULL, | ||
859 | NULL, | ||
860 | NULL, | ||
861 | "setcontext", /* 380 */ | ||
862 | "sigaltstack", | ||
863 | "waitid", | ||
864 | "setpgrp", | ||
865 | "recvmsg2", | ||
866 | "sendmsg2", /* 385 */ | ||
867 | "socket2", | ||
868 | "socketpair2", | ||
869 | "setregid", | ||
870 | "lwp_create", | ||
871 | "lwp_terminate", /* 390 */ | ||
872 | "lwp_wait", | ||
873 | "lwp_suspend", | ||
874 | "lwp_resume", | ||
875 | "lwp_self", | ||
876 | "lwp_abort_syscall", /* 395 */ | ||
877 | "lwp_info", | ||
878 | "lwp_kill", | ||
879 | "ksleep", | ||
880 | "kwakeup", | ||
881 | "ksleep_abort", /* 400 */ | ||
882 | "lwp_proc_info", | ||
883 | "lwp_exit", | ||
884 | "lwp_continue", | ||
885 | "getacl", | ||
886 | "fgetacl", /* 405 */ | ||
887 | "setacl", | ||
888 | "fsetacl", | ||
889 | "getaccess", | ||
890 | "lwp_mutex_init", | ||
891 | "lwp_mutex_lock_sys", /* 410 */ | ||
892 | "lwp_mutex_unlock", | ||
893 | "lwp_cond_init", | ||
894 | "lwp_cond_signal", | ||
895 | "lwp_cond_broadcast", | ||
896 | "lwp_cond_wait_sys", /* 415 */ | ||
897 | "lwp_getscheduler", | ||
898 | "lwp_setscheduler", | ||
899 | "lwp_getprivate", | ||
900 | "lwp_setprivate", | ||
901 | "lwp_detach", /* 420 */ | ||
902 | "mlock", | ||
903 | "munlock", | ||
904 | "mlockall", | ||
905 | "munlockall", | ||
906 | "shm_open", /* 425 */ | ||
907 | "shm_unlink", | ||
908 | "sigqueue", | ||
909 | "sigwaitinfo", | ||
910 | "sigtimedwait", | ||
911 | "sigwait", /* 430 */ | ||
912 | "aio_read", | ||
913 | "aio_write", | ||
914 | "lio_listio", | ||
915 | "aio_error", | ||
916 | "aio_return", /* 435 */ | ||
917 | "aio_cancel", | ||
918 | "aio_suspend", | ||
919 | "aio_fsync", | ||
920 | "mq_open", | ||
921 | "mq_unlink", /* 440 */ | ||
922 | "mq_send", | ||
923 | "mq_receive", | ||
924 | "mq_notify", | ||
925 | "mq_setattr", | ||
926 | "mq_getattr", /* 445 */ | ||
927 | "ksem_open", | ||
928 | "ksem_unlink", | ||
929 | "ksem_close", | ||
930 | "ksem_destroy", | ||
931 | "lw_sem_incr", /* 450 */ | ||
932 | "lw_sem_decr", | ||
933 | "lw_sem_read", | ||
934 | "mq_close", | ||
935 | }; | ||
936 | static const int syscall_names_max = 453; | ||
937 | |||
938 | int | ||
939 | hpux_unimplemented(unsigned long arg1,unsigned long arg2,unsigned long arg3, | ||
940 | unsigned long arg4,unsigned long arg5,unsigned long arg6, | ||
941 | unsigned long arg7,unsigned long sc_num) | ||
942 | { | ||
943 | /* NOTE: sc_num trashes arg8 for the few syscalls that actually | ||
944 | * have a valid 8th argument. | ||
945 | */ | ||
946 | const char *name = NULL; | ||
947 | if ( sc_num <= syscall_names_max && sc_num >= 0 ) { | ||
948 | name = syscall_names[sc_num]; | ||
949 | } | ||
950 | |||
951 | if ( name ) { | ||
952 | printk(KERN_DEBUG "Unimplemented HP-UX syscall emulation. Syscall #%lu (%s)\n", | ||
953 | sc_num, name); | ||
954 | } else { | ||
955 | printk(KERN_DEBUG "Unimplemented unknown HP-UX syscall emulation. Syscall #%lu\n", | ||
956 | sc_num); | ||
957 | } | ||
958 | |||
959 | printk(KERN_DEBUG " Args: %lx %lx %lx %lx %lx %lx %lx\n", | ||
960 | arg1, arg2, arg3, arg4, arg5, arg6, arg7); | ||
961 | |||
962 | return -ENOSYS; | ||
963 | } | ||
diff --git a/arch/parisc/hpux/wrappers.S b/arch/parisc/hpux/wrappers.S deleted file mode 100644 index 58c53c879c02..000000000000 --- a/arch/parisc/hpux/wrappers.S +++ /dev/null | |||
@@ -1,250 +0,0 @@ | |||
1 | /* | ||
2 | * Linux/PARISC Project (http://www.parisc-linux.org/) | ||
3 | * | ||
4 | * HP-UX System Call Wrapper routines and System Call Return Path | ||
5 | * | ||
6 | * Copyright (C) 2000 Hewlett-Packard (John Marvin) | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_64BIT | ||
24 | #warning PA64 support needs more work...did first cut | ||
25 | #endif | ||
26 | |||
27 | #include <asm/asm-offsets.h> | ||
28 | #include <asm/assembly.h> | ||
29 | #include <asm/signal.h> | ||
30 | #include <linux/linkage.h> | ||
31 | |||
32 | .level LEVEL | ||
33 | .text | ||
34 | |||
35 | /* These should probably go in a header file somewhere. | ||
36 | * They are duplicated in kernel/wrappers.S | ||
37 | * Possibly we should consider consolidating these | ||
38 | * register save/restore macros. | ||
39 | */ | ||
40 | .macro reg_save regs | ||
41 | #ifdef CONFIG_64BIT | ||
42 | #warning NEEDS WORK for 64-bit | ||
43 | #endif | ||
44 | STREG %r3, PT_GR3(\regs) | ||
45 | STREG %r4, PT_GR4(\regs) | ||
46 | STREG %r5, PT_GR5(\regs) | ||
47 | STREG %r6, PT_GR6(\regs) | ||
48 | STREG %r7, PT_GR7(\regs) | ||
49 | STREG %r8, PT_GR8(\regs) | ||
50 | STREG %r9, PT_GR9(\regs) | ||
51 | STREG %r10,PT_GR10(\regs) | ||
52 | STREG %r11,PT_GR11(\regs) | ||
53 | STREG %r12,PT_GR12(\regs) | ||
54 | STREG %r13,PT_GR13(\regs) | ||
55 | STREG %r14,PT_GR14(\regs) | ||
56 | STREG %r15,PT_GR15(\regs) | ||
57 | STREG %r16,PT_GR16(\regs) | ||
58 | STREG %r17,PT_GR17(\regs) | ||
59 | STREG %r18,PT_GR18(\regs) | ||
60 | .endm | ||
61 | |||
62 | .macro reg_restore regs | ||
63 | LDREG PT_GR3(\regs), %r3 | ||
64 | LDREG PT_GR4(\regs), %r4 | ||
65 | LDREG PT_GR5(\regs), %r5 | ||
66 | LDREG PT_GR6(\regs), %r6 | ||
67 | LDREG PT_GR7(\regs), %r7 | ||
68 | LDREG PT_GR8(\regs), %r8 | ||
69 | LDREG PT_GR9(\regs), %r9 | ||
70 | LDREG PT_GR10(\regs),%r10 | ||
71 | LDREG PT_GR11(\regs),%r11 | ||
72 | LDREG PT_GR12(\regs),%r12 | ||
73 | LDREG PT_GR13(\regs),%r13 | ||
74 | LDREG PT_GR14(\regs),%r14 | ||
75 | LDREG PT_GR15(\regs),%r15 | ||
76 | LDREG PT_GR16(\regs),%r16 | ||
77 | LDREG PT_GR17(\regs),%r17 | ||
78 | LDREG PT_GR18(\regs),%r18 | ||
79 | .endm | ||
80 | |||
81 | |||
82 | .import sys_fork | ||
83 | |||
84 | ENTRY(hpux_fork_wrapper) | ||
85 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs | ||
86 | ;! pointer in task | ||
87 | reg_save %r1 | ||
88 | |||
89 | STREG %r2,-20(%r30) | ||
90 | ldo 64(%r30),%r30 | ||
91 | STREG %r2,PT_GR19(%r1) ;! save for child | ||
92 | STREG %r30,PT_GR21(%r1) ;! save for child | ||
93 | |||
94 | LDREG PT_GR30(%r1),%r25 | ||
95 | mtctl %r25,%cr29 | ||
96 | copy %r1,%r24 | ||
97 | bl sys_clone,%r2 | ||
98 | ldi SIGCHLD,%r26 | ||
99 | |||
100 | LDREG -84(%r30),%r2 | ||
101 | fork_return: | ||
102 | ldo -64(%r30),%r30 | ||
103 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs | ||
104 | |||
105 | reg_restore %r1 | ||
106 | |||
107 | /* | ||
108 | * HP-UX wants pid (child gets parent pid, parent gets child pid) | ||
109 | * in r28 and a flag in r29 (r29 == 1 for child, 0 for parent). | ||
110 | * Linux fork returns 0 for child, pid for parent. Since HP-UX | ||
111 | * libc stub throws away parent pid and returns 0 for child, | ||
112 | * we'll just return 0 for parent pid now. Only applications | ||
113 | * that jump directly to the gateway page (not supported) will | ||
114 | * know the difference. We can fix this later if necessary. | ||
115 | */ | ||
116 | |||
117 | ldo -1024(%r0),%r1 | ||
118 | comb,>>=,n %r28,%r1,fork_exit /* just let the syscall exit handle it */ | ||
119 | or,= %r28,%r0,%r0 | ||
120 | or,tr %r0,%r0,%r29 /* r28 <> 0, we are parent, set r29 to 0 */ | ||
121 | ldo 1(%r0),%r29 /* r28 == 0, we are child, set r29 to 1 */ | ||
122 | |||
123 | fork_exit: | ||
124 | bv %r0(%r2) | ||
125 | nop | ||
126 | ENDPROC(hpux_fork_wrapper) | ||
127 | |||
128 | /* Set the return value for the child */ | ||
129 | |||
130 | ENTRY(hpux_child_return) | ||
131 | #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) | ||
132 | bl,n schedule_tail, %r2 | ||
133 | #endif | ||
134 | |||
135 | LDREG TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2 | ||
136 | b fork_return | ||
137 | copy %r0,%r28 | ||
138 | ENDPROC(hpux_child_return) | ||
139 | |||
140 | .import hpux_execve | ||
141 | |||
142 | ENTRY(hpux_execv_wrapper) | ||
143 | copy %r0,%r24 /* NULL environment */ | ||
144 | |||
145 | ENTRY(hpux_execve_wrapper) | ||
146 | |||
147 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs | ||
148 | |||
149 | /* | ||
150 | * Do we need to save/restore r3-r18 here? | ||
151 | * I don't think so. why would new thread need old | ||
152 | * threads registers? | ||
153 | */ | ||
154 | |||
155 | /* Store arg0, arg1 and arg2 so that hpux_execve will find them */ | ||
156 | |||
157 | STREG %r26,PT_GR26(%r1) | ||
158 | STREG %r25,PT_GR25(%r1) | ||
159 | STREG %r24,PT_GR24(%r1) | ||
160 | |||
161 | STREG %r2,-20(%r30) | ||
162 | ldo 64(%r30),%r30 | ||
163 | bl hpux_execve,%r2 | ||
164 | copy %r1,%arg0 | ||
165 | |||
166 | ldo -64(%r30),%r30 | ||
167 | LDREG -20(%r30),%r2 | ||
168 | |||
169 | /* If exec succeeded we need to load the args */ | ||
170 | |||
171 | ldo -1024(%r0),%r1 | ||
172 | comb,>>= %r28,%r1,exec_error | ||
173 | copy %r2,%r19 | ||
174 | ldo -TASK_SZ_ALGN-64(%r30),%r1 ;! get task ptr | ||
175 | LDREG TASK_PT_GR26(%r1),%r26 | ||
176 | LDREG TASK_PT_GR25(%r1),%r25 | ||
177 | LDREG TASK_PT_GR24(%r1),%r24 | ||
178 | LDREG TASK_PT_GR23(%r1),%r23 | ||
179 | copy %r0,%r2 /* Flag to syscall_exit not to clear args */ | ||
180 | |||
181 | exec_error: | ||
182 | bv %r0(%r19) | ||
183 | nop | ||
184 | ENDPROC(hpux_execv_wrapper) | ||
185 | |||
186 | .import hpux_pipe | ||
187 | |||
188 | /* HP-UX expects pipefd's returned in r28 & r29 */ | ||
189 | |||
190 | ENTRY(hpux_pipe_wrapper) | ||
191 | STREG %r2,-20(%r30) | ||
192 | ldo 64(%r30),%r30 | ||
193 | bl hpux_pipe,%r2 | ||
194 | ldo -56(%r30),%r26 /* pass local array to hpux_pipe */ | ||
195 | |||
196 | |||
197 | ldo -1024(%r0),%r1 | ||
198 | comb,>>= %r28,%r1,pipe_exit /* let syscall exit handle it */ | ||
199 | LDREG -84(%r30),%r2 | ||
200 | |||
201 | /* if success, load fd's from stack array */ | ||
202 | |||
203 | LDREG -56(%r30),%r28 | ||
204 | LDREG -52(%r30),%r29 | ||
205 | |||
206 | pipe_exit: | ||
207 | bv %r0(%r2) | ||
208 | ldo -64(%r30),%r30 | ||
209 | ENDPROC(hpux_pipe_wrapper) | ||
210 | |||
211 | .import syscall_exit | ||
212 | |||
213 | ENTRY(hpux_syscall_exit) | ||
214 | /* | ||
215 | * | ||
216 | * HP-UX call return conventions: | ||
217 | * | ||
218 | * if error: | ||
219 | * r22 = 1 | ||
220 | * r28 = errno value | ||
221 | * r29 = secondary return value | ||
222 | * else | ||
223 | * r22 = 0 | ||
224 | * r28 = return value | ||
225 | * r29 = secondary return value | ||
226 | * | ||
227 | * For now, we'll just check to see if r28 is < (unsigned long)-1024 | ||
228 | * (to handle addresses > 2 Gb) and if so set r22 to zero. If not, | ||
229 | * we'll complement r28 and set r22 to 1. Wrappers will be | ||
230 | * needed for syscalls that care about the secondary return value. | ||
231 | * The wrapper may also need a way of avoiding the following code, | ||
232 | * but we'll deal with that when it becomes necessary. | ||
233 | */ | ||
234 | |||
235 | ldo -1024(%r0),%r1 | ||
236 | comb,<< %r28,%r1,no_error | ||
237 | copy %r0,%r22 | ||
238 | subi 0,%r28,%r28 | ||
239 | ldo 1(%r0),%r22 | ||
240 | |||
241 | no_error: | ||
242 | b,n syscall_exit | ||
243 | ENDPROC(hpux_syscall_exit) | ||
244 | |||
245 | .import hpux_unimplemented | ||
246 | |||
247 | ENTRY(hpux_unimplemented_wrapper) | ||
248 | b hpux_unimplemented | ||
249 | STREG %r22,-64(%r30) /* overwrite arg8 with syscall number */ | ||
250 | ENDPROC(hpux_unimplemented_wrapper) | ||