diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 17:25:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 17:25:58 -0500 |
commit | 9cd77374f0a9cbb7ec35a9aaeb6473755afe0e3e (patch) | |
tree | d96f00fa7f63e244602664489573d30705113062 /arch | |
parent | b0f0c26a2ed49eccf98a011b86fe24fb9f2b35f6 (diff) | |
parent | 35e88d5c22e1916c819b5a8756aed2f09a4aba18 (diff) |
Merge branch 'parisc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc update from Helge Deller:
"The major change in here is the removal of the old HP-UX compat code
which should have made it possible to load and execute 32-bit HP-UX
binaries on PA-RISC Linux. Since it was never functional and since
nobody cares about old 32-bit HPUX binaries any longer, it's now time
to free up 3200 lines of kernel code (CONFIG_HPUX and
CONFIG_BINFMT_SOM).
Other than that we wire up the execveat() syscall, fix sparse errors
and have some whitespace cleanups"
* 'parisc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
fs/binfmt_som: Drop kernel support for HP-UX SOM binaries
parisc: Remove unused function
parisc: macro whitespace fixes
parisc/uaccess: fix sparse errors
parisc: hpux - Remove HPUX syscall numbers
parisc: hpux - Remove hpux gateway page
parisc: hpux - Delete files in hpux subdirectory
parisc: hpux - Do not compile hpux subdirectory
parisc: hpux - Drop support for HP-UX binaries
parisc: Add error checks when building up signal trampoline handler
parisc: Wire up execveat syscall
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/Kconfig | 4 | ||||
-rw-r--r-- | arch/parisc/Makefile | 1 | ||||
-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 | ||||
-rw-r--r-- | arch/parisc/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/uaccess.h | 116 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/unistd.h | 481 | ||||
-rw-r--r-- | arch/parisc/kernel/entry.S | 20 | ||||
-rw-r--r-- | arch/parisc/kernel/process.c | 15 | ||||
-rw-r--r-- | arch/parisc/kernel/signal.c | 32 | ||||
-rw-r--r-- | arch/parisc/kernel/smp.c | 3 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 1 | ||||
-rw-r--r-- | arch/parisc/mm/init.c | 72 |
18 files changed, 80 insertions, 2802 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 1554a6f2a5bb..8014727a2743 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -291,10 +291,6 @@ config SYSVIPC_COMPAT | |||
291 | config AUDIT_ARCH | 291 | config AUDIT_ARCH |
292 | def_bool y | 292 | def_bool y |
293 | 293 | ||
294 | config HPUX | ||
295 | bool "Support for HP-UX binaries" | ||
296 | depends on !64BIT | ||
297 | |||
298 | config NR_CPUS | 294 | config NR_CPUS |
299 | int "Maximum number of CPUs (2-32)" | 295 | int "Maximum number of CPUs (2-32)" |
300 | range 2 32 | 296 | range 2 32 |
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 5db8882f732c..91fbb6ee702c 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -84,7 +84,6 @@ head-y := arch/parisc/kernel/head.o | |||
84 | KBUILD_CFLAGS += $(cflags-y) | 84 | KBUILD_CFLAGS += $(cflags-y) |
85 | 85 | ||
86 | kernel-y := mm/ kernel/ math-emu/ | 86 | kernel-y := mm/ kernel/ math-emu/ |
87 | kernel-$(CONFIG_HPUX) += hpux/ | ||
88 | 87 | ||
89 | core-y += $(addprefix arch/parisc/, $(kernel-y)) | 88 | core-y += $(addprefix arch/parisc/, $(kernel-y)) |
90 | libs-y += arch/parisc/lib/ $(LIBGCC) | 89 | libs-y += arch/parisc/lib/ $(LIBGCC) |
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) | ||
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index 689a8ade3606..54adb60c0a42 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
@@ -330,8 +330,6 @@ struct mm_struct; | |||
330 | /* Free all resources held by a thread. */ | 330 | /* Free all resources held by a thread. */ |
331 | extern void release_thread(struct task_struct *); | 331 | extern void release_thread(struct task_struct *); |
332 | 332 | ||
333 | extern void map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm); | ||
334 | |||
335 | extern unsigned long get_wchan(struct task_struct *p); | 333 | extern unsigned long get_wchan(struct task_struct *p); |
336 | 334 | ||
337 | #define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0]) | 335 | #define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0]) |
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index a5cb070b54bf..0abdd4c607ed 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define KERNEL_DS ((mm_segment_t){0}) | 17 | #define KERNEL_DS ((mm_segment_t){0}) |
18 | #define USER_DS ((mm_segment_t){1}) | 18 | #define USER_DS ((mm_segment_t){1}) |
19 | 19 | ||
20 | #define segment_eq(a,b) ((a).seg == (b).seg) | 20 | #define segment_eq(a, b) ((a).seg == (b).seg) |
21 | 21 | ||
22 | #define get_ds() (KERNEL_DS) | 22 | #define get_ds() (KERNEL_DS) |
23 | #define get_fs() (current_thread_info()->addr_limit) | 23 | #define get_fs() (current_thread_info()->addr_limit) |
@@ -42,14 +42,14 @@ static inline long access_ok(int type, const void __user * addr, | |||
42 | #if !defined(CONFIG_64BIT) | 42 | #if !defined(CONFIG_64BIT) |
43 | #define LDD_KERNEL(ptr) BUILD_BUG() | 43 | #define LDD_KERNEL(ptr) BUILD_BUG() |
44 | #define LDD_USER(ptr) BUILD_BUG() | 44 | #define LDD_USER(ptr) BUILD_BUG() |
45 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) | 45 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x, ptr) |
46 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) | 46 | #define STD_USER(x, ptr) __put_user_asm64(x, ptr) |
47 | #define ASM_WORD_INSN ".word\t" | 47 | #define ASM_WORD_INSN ".word\t" |
48 | #else | 48 | #else |
49 | #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr) | 49 | #define LDD_KERNEL(ptr) __get_kernel_asm("ldd", ptr) |
50 | #define LDD_USER(ptr) __get_user_asm("ldd",ptr) | 50 | #define LDD_USER(ptr) __get_user_asm("ldd", ptr) |
51 | #define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr) | 51 | #define STD_KERNEL(x, ptr) __put_kernel_asm("std", x, ptr) |
52 | #define STD_USER(x, ptr) __put_user_asm("std",x,ptr) | 52 | #define STD_USER(x, ptr) __put_user_asm("std", x, ptr) |
53 | #define ASM_WORD_INSN ".dword\t" | 53 | #define ASM_WORD_INSN ".dword\t" |
54 | #endif | 54 | #endif |
55 | 55 | ||
@@ -80,68 +80,68 @@ struct exception_data { | |||
80 | unsigned long fault_addr; | 80 | unsigned long fault_addr; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | #define __get_user(x,ptr) \ | 83 | #define __get_user(x, ptr) \ |
84 | ({ \ | 84 | ({ \ |
85 | register long __gu_err __asm__ ("r8") = 0; \ | 85 | register long __gu_err __asm__ ("r8") = 0; \ |
86 | register long __gu_val __asm__ ("r9") = 0; \ | 86 | register long __gu_val __asm__ ("r9") = 0; \ |
87 | \ | 87 | \ |
88 | if (segment_eq(get_fs(),KERNEL_DS)) { \ | 88 | if (segment_eq(get_fs(), KERNEL_DS)) { \ |
89 | switch (sizeof(*(ptr))) { \ | 89 | switch (sizeof(*(ptr))) { \ |
90 | case 1: __get_kernel_asm("ldb",ptr); break; \ | 90 | case 1: __get_kernel_asm("ldb", ptr); break; \ |
91 | case 2: __get_kernel_asm("ldh",ptr); break; \ | 91 | case 2: __get_kernel_asm("ldh", ptr); break; \ |
92 | case 4: __get_kernel_asm("ldw",ptr); break; \ | 92 | case 4: __get_kernel_asm("ldw", ptr); break; \ |
93 | case 8: LDD_KERNEL(ptr); break; \ | 93 | case 8: LDD_KERNEL(ptr); break; \ |
94 | default: BUILD_BUG(); break; \ | 94 | default: BUILD_BUG(); break; \ |
95 | } \ | 95 | } \ |
96 | } \ | 96 | } \ |
97 | else { \ | 97 | else { \ |
98 | switch (sizeof(*(ptr))) { \ | 98 | switch (sizeof(*(ptr))) { \ |
99 | case 1: __get_user_asm("ldb",ptr); break; \ | 99 | case 1: __get_user_asm("ldb", ptr); break; \ |
100 | case 2: __get_user_asm("ldh",ptr); break; \ | 100 | case 2: __get_user_asm("ldh", ptr); break; \ |
101 | case 4: __get_user_asm("ldw",ptr); break; \ | 101 | case 4: __get_user_asm("ldw", ptr); break; \ |
102 | case 8: LDD_USER(ptr); break; \ | 102 | case 8: LDD_USER(ptr); break; \ |
103 | default: BUILD_BUG(); break; \ | 103 | default: BUILD_BUG(); break; \ |
104 | } \ | 104 | } \ |
105 | } \ | 105 | } \ |
106 | \ | 106 | \ |
107 | (x) = (__typeof__(*(ptr))) __gu_val; \ | 107 | (x) = (__force __typeof__(*(ptr))) __gu_val; \ |
108 | __gu_err; \ | 108 | __gu_err; \ |
109 | }) | 109 | }) |
110 | 110 | ||
111 | #define __get_kernel_asm(ldx,ptr) \ | 111 | #define __get_kernel_asm(ldx, ptr) \ |
112 | __asm__("\n1:\t" ldx "\t0(%2),%0\n\t" \ | 112 | __asm__("\n1:\t" ldx "\t0(%2),%0\n\t" \ |
113 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_1)\ | 113 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_1)\ |
114 | : "=r"(__gu_val), "=r"(__gu_err) \ | 114 | : "=r"(__gu_val), "=r"(__gu_err) \ |
115 | : "r"(ptr), "1"(__gu_err) \ | 115 | : "r"(ptr), "1"(__gu_err) \ |
116 | : "r1"); | 116 | : "r1"); |
117 | 117 | ||
118 | #define __get_user_asm(ldx,ptr) \ | 118 | #define __get_user_asm(ldx, ptr) \ |
119 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n\t" \ | 119 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n\t" \ |
120 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_get_user_skip_1)\ | 120 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_1)\ |
121 | : "=r"(__gu_val), "=r"(__gu_err) \ | 121 | : "=r"(__gu_val), "=r"(__gu_err) \ |
122 | : "r"(ptr), "1"(__gu_err) \ | 122 | : "r"(ptr), "1"(__gu_err) \ |
123 | : "r1"); | 123 | : "r1"); |
124 | 124 | ||
125 | #define __put_user(x,ptr) \ | 125 | #define __put_user(x, ptr) \ |
126 | ({ \ | 126 | ({ \ |
127 | register long __pu_err __asm__ ("r8") = 0; \ | 127 | register long __pu_err __asm__ ("r8") = 0; \ |
128 | __typeof__(*(ptr)) __x = (__typeof__(*(ptr)))(x); \ | 128 | __typeof__(*(ptr)) __x = (__typeof__(*(ptr)))(x); \ |
129 | \ | 129 | \ |
130 | if (segment_eq(get_fs(),KERNEL_DS)) { \ | 130 | if (segment_eq(get_fs(), KERNEL_DS)) { \ |
131 | switch (sizeof(*(ptr))) { \ | 131 | switch (sizeof(*(ptr))) { \ |
132 | case 1: __put_kernel_asm("stb",__x,ptr); break; \ | 132 | case 1: __put_kernel_asm("stb", __x, ptr); break; \ |
133 | case 2: __put_kernel_asm("sth",__x,ptr); break; \ | 133 | case 2: __put_kernel_asm("sth", __x, ptr); break; \ |
134 | case 4: __put_kernel_asm("stw",__x,ptr); break; \ | 134 | case 4: __put_kernel_asm("stw", __x, ptr); break; \ |
135 | case 8: STD_KERNEL(__x,ptr); break; \ | 135 | case 8: STD_KERNEL(__x, ptr); break; \ |
136 | default: BUILD_BUG(); break; \ | 136 | default: BUILD_BUG(); break; \ |
137 | } \ | 137 | } \ |
138 | } \ | 138 | } \ |
139 | else { \ | 139 | else { \ |
140 | switch (sizeof(*(ptr))) { \ | 140 | switch (sizeof(*(ptr))) { \ |
141 | case 1: __put_user_asm("stb",__x,ptr); break; \ | 141 | case 1: __put_user_asm("stb", __x, ptr); break; \ |
142 | case 2: __put_user_asm("sth",__x,ptr); break; \ | 142 | case 2: __put_user_asm("sth", __x, ptr); break; \ |
143 | case 4: __put_user_asm("stw",__x,ptr); break; \ | 143 | case 4: __put_user_asm("stw", __x, ptr); break; \ |
144 | case 8: STD_USER(__x,ptr); break; \ | 144 | case 8: STD_USER(__x, ptr); break; \ |
145 | default: BUILD_BUG(); break; \ | 145 | default: BUILD_BUG(); break; \ |
146 | } \ | 146 | } \ |
147 | } \ | 147 | } \ |
@@ -159,18 +159,18 @@ struct exception_data { | |||
159 | * r8/r9 are already listed as err/val. | 159 | * r8/r9 are already listed as err/val. |
160 | */ | 160 | */ |
161 | 161 | ||
162 | #define __put_kernel_asm(stx,x,ptr) \ | 162 | #define __put_kernel_asm(stx, x, ptr) \ |
163 | __asm__ __volatile__ ( \ | 163 | __asm__ __volatile__ ( \ |
164 | "\n1:\t" stx "\t%2,0(%1)\n\t" \ | 164 | "\n1:\t" stx "\t%2,0(%1)\n\t" \ |
165 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\ | 165 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_put_user_skip_1)\ |
166 | : "=r"(__pu_err) \ | 166 | : "=r"(__pu_err) \ |
167 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | 167 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
168 | : "r1") | 168 | : "r1") |
169 | 169 | ||
170 | #define __put_user_asm(stx,x,ptr) \ | 170 | #define __put_user_asm(stx, x, ptr) \ |
171 | __asm__ __volatile__ ( \ | 171 | __asm__ __volatile__ ( \ |
172 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n\t" \ | 172 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n\t" \ |
173 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\ | 173 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_put_user_skip_1)\ |
174 | : "=r"(__pu_err) \ | 174 | : "=r"(__pu_err) \ |
175 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | 175 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
176 | : "r1") | 176 | : "r1") |
@@ -178,23 +178,23 @@ struct exception_data { | |||
178 | 178 | ||
179 | #if !defined(CONFIG_64BIT) | 179 | #if !defined(CONFIG_64BIT) |
180 | 180 | ||
181 | #define __put_kernel_asm64(__val,ptr) do { \ | 181 | #define __put_kernel_asm64(__val, ptr) do { \ |
182 | __asm__ __volatile__ ( \ | 182 | __asm__ __volatile__ ( \ |
183 | "\n1:\tstw %2,0(%1)" \ | 183 | "\n1:\tstw %2,0(%1)" \ |
184 | "\n2:\tstw %R2,4(%1)\n\t" \ | 184 | "\n2:\tstw %R2,4(%1)\n\t" \ |
185 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ | 185 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_put_user_skip_2)\ |
186 | ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ | 186 | ASM_EXCEPTIONTABLE_ENTRY(2b, fixup_put_user_skip_1)\ |
187 | : "=r"(__pu_err) \ | 187 | : "=r"(__pu_err) \ |
188 | : "r"(ptr), "r"(__val), "0"(__pu_err) \ | 188 | : "r"(ptr), "r"(__val), "0"(__pu_err) \ |
189 | : "r1"); \ | 189 | : "r1"); \ |
190 | } while (0) | 190 | } while (0) |
191 | 191 | ||
192 | #define __put_user_asm64(__val,ptr) do { \ | 192 | #define __put_user_asm64(__val, ptr) do { \ |
193 | __asm__ __volatile__ ( \ | 193 | __asm__ __volatile__ ( \ |
194 | "\n1:\tstw %2,0(%%sr3,%1)" \ | 194 | "\n1:\tstw %2,0(%%sr3,%1)" \ |
195 | "\n2:\tstw %R2,4(%%sr3,%1)\n\t" \ | 195 | "\n2:\tstw %R2,4(%%sr3,%1)\n\t" \ |
196 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ | 196 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_put_user_skip_2)\ |
197 | ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ | 197 | ASM_EXCEPTIONTABLE_ENTRY(2b, fixup_put_user_skip_1)\ |
198 | : "=r"(__pu_err) \ | 198 | : "=r"(__pu_err) \ |
199 | : "r"(ptr), "r"(__val), "0"(__pu_err) \ | 199 | : "r"(ptr), "r"(__val), "0"(__pu_err) \ |
200 | : "r1"); \ | 200 | : "r1"); \ |
@@ -211,8 +211,8 @@ extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long); | |||
211 | extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long); | 211 | extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long); |
212 | extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long); | 212 | extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long); |
213 | extern long strncpy_from_user(char *, const char __user *, long); | 213 | extern long strncpy_from_user(char *, const char __user *, long); |
214 | extern unsigned lclear_user(void __user *,unsigned long); | 214 | extern unsigned lclear_user(void __user *, unsigned long); |
215 | extern long lstrnlen_user(const char __user *,long); | 215 | extern long lstrnlen_user(const char __user *, long); |
216 | /* | 216 | /* |
217 | * Complex access routines -- macros | 217 | * Complex access routines -- macros |
218 | */ | 218 | */ |
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index 5f5c0373de63..2e639d7604f6 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h | |||
@@ -2,480 +2,6 @@ | |||
2 | #define _UAPI_ASM_PARISC_UNISTD_H_ | 2 | #define _UAPI_ASM_PARISC_UNISTD_H_ |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * HP-UX system calls get their native numbers for binary compatibility. | ||
10 | */ | ||
11 | |||
12 | #define __NR_HPUX_exit 1 | ||
13 | #define __NR_HPUX_fork 2 | ||
14 | #define __NR_HPUX_read 3 | ||
15 | #define __NR_HPUX_write 4 | ||
16 | #define __NR_HPUX_open 5 | ||
17 | #define __NR_HPUX_close 6 | ||
18 | #define __NR_HPUX_wait 7 | ||
19 | #define __NR_HPUX_creat 8 | ||
20 | #define __NR_HPUX_link 9 | ||
21 | #define __NR_HPUX_unlink 10 | ||
22 | #define __NR_HPUX_execv 11 | ||
23 | #define __NR_HPUX_chdir 12 | ||
24 | #define __NR_HPUX_time 13 | ||
25 | #define __NR_HPUX_mknod 14 | ||
26 | #define __NR_HPUX_chmod 15 | ||
27 | #define __NR_HPUX_chown 16 | ||
28 | #define __NR_HPUX_break 17 | ||
29 | #define __NR_HPUX_lchmod 18 | ||
30 | #define __NR_HPUX_lseek 19 | ||
31 | #define __NR_HPUX_getpid 20 | ||
32 | #define __NR_HPUX_mount 21 | ||
33 | #define __NR_HPUX_umount 22 | ||
34 | #define __NR_HPUX_setuid 23 | ||
35 | #define __NR_HPUX_getuid 24 | ||
36 | #define __NR_HPUX_stime 25 | ||
37 | #define __NR_HPUX_ptrace 26 | ||
38 | #define __NR_HPUX_alarm 27 | ||
39 | #define __NR_HPUX_oldfstat 28 | ||
40 | #define __NR_HPUX_pause 29 | ||
41 | #define __NR_HPUX_utime 30 | ||
42 | #define __NR_HPUX_stty 31 | ||
43 | #define __NR_HPUX_gtty 32 | ||
44 | #define __NR_HPUX_access 33 | ||
45 | #define __NR_HPUX_nice 34 | ||
46 | #define __NR_HPUX_ftime 35 | ||
47 | #define __NR_HPUX_sync 36 | ||
48 | #define __NR_HPUX_kill 37 | ||
49 | #define __NR_HPUX_stat 38 | ||
50 | #define __NR_HPUX_setpgrp3 39 | ||
51 | #define __NR_HPUX_lstat 40 | ||
52 | #define __NR_HPUX_dup 41 | ||
53 | #define __NR_HPUX_pipe 42 | ||
54 | #define __NR_HPUX_times 43 | ||
55 | #define __NR_HPUX_profil 44 | ||
56 | #define __NR_HPUX_ki_call 45 | ||
57 | #define __NR_HPUX_setgid 46 | ||
58 | #define __NR_HPUX_getgid 47 | ||
59 | #define __NR_HPUX_sigsys 48 | ||
60 | #define __NR_HPUX_reserved1 49 | ||
61 | #define __NR_HPUX_reserved2 50 | ||
62 | #define __NR_HPUX_acct 51 | ||
63 | #define __NR_HPUX_set_userthreadid 52 | ||
64 | #define __NR_HPUX_oldlock 53 | ||
65 | #define __NR_HPUX_ioctl 54 | ||
66 | #define __NR_HPUX_reboot 55 | ||
67 | #define __NR_HPUX_symlink 56 | ||
68 | #define __NR_HPUX_utssys 57 | ||
69 | #define __NR_HPUX_readlink 58 | ||
70 | #define __NR_HPUX_execve 59 | ||
71 | #define __NR_HPUX_umask 60 | ||
72 | #define __NR_HPUX_chroot 61 | ||
73 | #define __NR_HPUX_fcntl 62 | ||
74 | #define __NR_HPUX_ulimit 63 | ||
75 | #define __NR_HPUX_getpagesize 64 | ||
76 | #define __NR_HPUX_mremap 65 | ||
77 | #define __NR_HPUX_vfork 66 | ||
78 | #define __NR_HPUX_vread 67 | ||
79 | #define __NR_HPUX_vwrite 68 | ||
80 | #define __NR_HPUX_sbrk 69 | ||
81 | #define __NR_HPUX_sstk 70 | ||
82 | #define __NR_HPUX_mmap 71 | ||
83 | #define __NR_HPUX_vadvise 72 | ||
84 | #define __NR_HPUX_munmap 73 | ||
85 | #define __NR_HPUX_mprotect 74 | ||
86 | #define __NR_HPUX_madvise 75 | ||
87 | #define __NR_HPUX_vhangup 76 | ||
88 | #define __NR_HPUX_swapoff 77 | ||
89 | #define __NR_HPUX_mincore 78 | ||
90 | #define __NR_HPUX_getgroups 79 | ||
91 | #define __NR_HPUX_setgroups 80 | ||
92 | #define __NR_HPUX_getpgrp2 81 | ||
93 | #define __NR_HPUX_setpgrp2 82 | ||
94 | #define __NR_HPUX_setitimer 83 | ||
95 | #define __NR_HPUX_wait3 84 | ||
96 | #define __NR_HPUX_swapon 85 | ||
97 | #define __NR_HPUX_getitimer 86 | ||
98 | #define __NR_HPUX_gethostname42 87 | ||
99 | #define __NR_HPUX_sethostname42 88 | ||
100 | #define __NR_HPUX_getdtablesize 89 | ||
101 | #define __NR_HPUX_dup2 90 | ||
102 | #define __NR_HPUX_getdopt 91 | ||
103 | #define __NR_HPUX_fstat 92 | ||
104 | #define __NR_HPUX_select 93 | ||
105 | #define __NR_HPUX_setdopt 94 | ||
106 | #define __NR_HPUX_fsync 95 | ||
107 | #define __NR_HPUX_setpriority 96 | ||
108 | #define __NR_HPUX_socket_old 97 | ||
109 | #define __NR_HPUX_connect_old 98 | ||
110 | #define __NR_HPUX_accept_old 99 | ||
111 | #define __NR_HPUX_getpriority 100 | ||
112 | #define __NR_HPUX_send_old 101 | ||
113 | #define __NR_HPUX_recv_old 102 | ||
114 | #define __NR_HPUX_socketaddr_old 103 | ||
115 | #define __NR_HPUX_bind_old 104 | ||
116 | #define __NR_HPUX_setsockopt_old 105 | ||
117 | #define __NR_HPUX_listen_old 106 | ||
118 | #define __NR_HPUX_vtimes_old 107 | ||
119 | #define __NR_HPUX_sigvector 108 | ||
120 | #define __NR_HPUX_sigblock 109 | ||
121 | #define __NR_HPUX_siggetmask 110 | ||
122 | #define __NR_HPUX_sigpause 111 | ||
123 | #define __NR_HPUX_sigstack 112 | ||
124 | #define __NR_HPUX_recvmsg_old 113 | ||
125 | #define __NR_HPUX_sendmsg_old 114 | ||
126 | #define __NR_HPUX_vtrace_old 115 | ||
127 | #define __NR_HPUX_gettimeofday 116 | ||
128 | #define __NR_HPUX_getrusage 117 | ||
129 | #define __NR_HPUX_getsockopt_old 118 | ||
130 | #define __NR_HPUX_resuba_old 119 | ||
131 | #define __NR_HPUX_readv 120 | ||
132 | #define __NR_HPUX_writev 121 | ||
133 | #define __NR_HPUX_settimeofday 122 | ||
134 | #define __NR_HPUX_fchown 123 | ||
135 | #define __NR_HPUX_fchmod 124 | ||
136 | #define __NR_HPUX_recvfrom_old 125 | ||
137 | #define __NR_HPUX_setresuid 126 | ||
138 | #define __NR_HPUX_setresgid 127 | ||
139 | #define __NR_HPUX_rename 128 | ||
140 | #define __NR_HPUX_truncate 129 | ||
141 | #define __NR_HPUX_ftruncate 130 | ||
142 | #define __NR_HPUX_flock_old 131 | ||
143 | #define __NR_HPUX_sysconf 132 | ||
144 | #define __NR_HPUX_sendto_old 133 | ||
145 | #define __NR_HPUX_shutdown_old 134 | ||
146 | #define __NR_HPUX_socketpair_old 135 | ||
147 | #define __NR_HPUX_mkdir 136 | ||
148 | #define __NR_HPUX_rmdir 137 | ||
149 | #define __NR_HPUX_utimes_old 138 | ||
150 | #define __NR_HPUX_sigcleanup_old 139 | ||
151 | #define __NR_HPUX_setcore 140 | ||
152 | #define __NR_HPUX_getpeername_old 141 | ||
153 | #define __NR_HPUX_gethostid 142 | ||
154 | #define __NR_HPUX_sethostid 143 | ||
155 | #define __NR_HPUX_getrlimit 144 | ||
156 | #define __NR_HPUX_setrlimit 145 | ||
157 | #define __NR_HPUX_killpg_old 146 | ||
158 | #define __NR_HPUX_cachectl 147 | ||
159 | #define __NR_HPUX_quotactl 148 | ||
160 | #define __NR_HPUX_get_sysinfo 149 | ||
161 | #define __NR_HPUX_getsockname_old 150 | ||
162 | #define __NR_HPUX_privgrp 151 | ||
163 | #define __NR_HPUX_rtprio 152 | ||
164 | #define __NR_HPUX_plock 153 | ||
165 | #define __NR_HPUX_reserved3 154 | ||
166 | #define __NR_HPUX_lockf 155 | ||
167 | #define __NR_HPUX_semget 156 | ||
168 | #define __NR_HPUX_osemctl 157 | ||
169 | #define __NR_HPUX_semop 158 | ||
170 | #define __NR_HPUX_msgget 159 | ||
171 | #define __NR_HPUX_omsgctl 160 | ||
172 | #define __NR_HPUX_msgsnd 161 | ||
173 | #define __NR_HPUX_msgrecv 162 | ||
174 | #define __NR_HPUX_shmget 163 | ||
175 | #define __NR_HPUX_oshmctl 164 | ||
176 | #define __NR_HPUX_shmat 165 | ||
177 | #define __NR_HPUX_shmdt 166 | ||
178 | #define __NR_HPUX_m68020_advise 167 | ||
179 | /* [168,189] are for Discless/DUX */ | ||
180 | #define __NR_HPUX_csp 168 | ||
181 | #define __NR_HPUX_cluster 169 | ||
182 | #define __NR_HPUX_mkrnod 170 | ||
183 | #define __NR_HPUX_test 171 | ||
184 | #define __NR_HPUX_unsp_open 172 | ||
185 | #define __NR_HPUX_reserved4 173 | ||
186 | #define __NR_HPUX_getcontext_old 174 | ||
187 | #define __NR_HPUX_osetcontext 175 | ||
188 | #define __NR_HPUX_bigio 176 | ||
189 | #define __NR_HPUX_pipenode 177 | ||
190 | #define __NR_HPUX_lsync 178 | ||
191 | #define __NR_HPUX_getmachineid 179 | ||
192 | #define __NR_HPUX_cnodeid 180 | ||
193 | #define __NR_HPUX_cnodes 181 | ||
194 | #define __NR_HPUX_swapclients 182 | ||
195 | #define __NR_HPUX_rmt_process 183 | ||
196 | #define __NR_HPUX_dskless_stats 184 | ||
197 | #define __NR_HPUX_sigprocmask 185 | ||
198 | #define __NR_HPUX_sigpending 186 | ||
199 | #define __NR_HPUX_sigsuspend 187 | ||
200 | #define __NR_HPUX_sigaction 188 | ||
201 | #define __NR_HPUX_reserved5 189 | ||
202 | #define __NR_HPUX_nfssvc 190 | ||
203 | #define __NR_HPUX_getfh 191 | ||
204 | #define __NR_HPUX_getdomainname 192 | ||
205 | #define __NR_HPUX_setdomainname 193 | ||
206 | #define __NR_HPUX_async_daemon 194 | ||
207 | #define __NR_HPUX_getdirentries 195 | ||
208 | #define __NR_HPUX_statfs 196 | ||
209 | #define __NR_HPUX_fstatfs 197 | ||
210 | #define __NR_HPUX_vfsmount 198 | ||
211 | #define __NR_HPUX_reserved6 199 | ||
212 | #define __NR_HPUX_waitpid 200 | ||
213 | /* 201 - 223 missing */ | ||
214 | #define __NR_HPUX_sigsetreturn 224 | ||
215 | #define __NR_HPUX_sigsetstatemask 225 | ||
216 | /* 226 missing */ | ||
217 | #define __NR_HPUX_cs 227 | ||
218 | #define __NR_HPUX_cds 228 | ||
219 | #define __NR_HPUX_set_no_trunc 229 | ||
220 | #define __NR_HPUX_pathconf 230 | ||
221 | #define __NR_HPUX_fpathconf 231 | ||
222 | /* 232, 233 missing */ | ||
223 | #define __NR_HPUX_nfs_fcntl 234 | ||
224 | #define __NR_HPUX_ogetacl 235 | ||
225 | #define __NR_HPUX_ofgetacl 236 | ||
226 | #define __NR_HPUX_osetacl 237 | ||
227 | #define __NR_HPUX_ofsetacl 238 | ||
228 | #define __NR_HPUX_pstat 239 | ||
229 | #define __NR_HPUX_getaudid 240 | ||
230 | #define __NR_HPUX_setaudid 241 | ||
231 | #define __NR_HPUX_getaudproc 242 | ||
232 | #define __NR_HPUX_setaudproc 243 | ||
233 | #define __NR_HPUX_getevent 244 | ||
234 | #define __NR_HPUX_setevent 245 | ||
235 | #define __NR_HPUX_audwrite 246 | ||
236 | #define __NR_HPUX_audswitch 247 | ||
237 | #define __NR_HPUX_audctl 248 | ||
238 | #define __NR_HPUX_ogetaccess 249 | ||
239 | #define __NR_HPUX_fsctl 250 | ||
240 | /* 251 - 258 missing */ | ||
241 | #define __NR_HPUX_swapfs 259 | ||
242 | #define __NR_HPUX_fss 260 | ||
243 | /* 261 - 266 missing */ | ||
244 | #define __NR_HPUX_tsync 267 | ||
245 | #define __NR_HPUX_getnumfds 268 | ||
246 | #define __NR_HPUX_poll 269 | ||
247 | #define __NR_HPUX_getmsg 270 | ||
248 | #define __NR_HPUX_putmsg 271 | ||
249 | #define __NR_HPUX_fchdir 272 | ||
250 | #define __NR_HPUX_getmount_cnt 273 | ||
251 | #define __NR_HPUX_getmount_entry 274 | ||
252 | #define __NR_HPUX_accept 275 | ||
253 | #define __NR_HPUX_bind 276 | ||
254 | #define __NR_HPUX_connect 277 | ||
255 | #define __NR_HPUX_getpeername 278 | ||
256 | #define __NR_HPUX_getsockname 279 | ||
257 | #define __NR_HPUX_getsockopt 280 | ||
258 | #define __NR_HPUX_listen 281 | ||
259 | #define __NR_HPUX_recv 282 | ||
260 | #define __NR_HPUX_recvfrom 283 | ||
261 | #define __NR_HPUX_recvmsg 284 | ||
262 | #define __NR_HPUX_send 285 | ||
263 | #define __NR_HPUX_sendmsg 286 | ||
264 | #define __NR_HPUX_sendto 287 | ||
265 | #define __NR_HPUX_setsockopt 288 | ||
266 | #define __NR_HPUX_shutdown 289 | ||
267 | #define __NR_HPUX_socket 290 | ||
268 | #define __NR_HPUX_socketpair 291 | ||
269 | #define __NR_HPUX_proc_open 292 | ||
270 | #define __NR_HPUX_proc_close 293 | ||
271 | #define __NR_HPUX_proc_send 294 | ||
272 | #define __NR_HPUX_proc_recv 295 | ||
273 | #define __NR_HPUX_proc_sendrecv 296 | ||
274 | #define __NR_HPUX_proc_syscall 297 | ||
275 | /* 298 - 311 missing */ | ||
276 | #define __NR_HPUX_semctl 312 | ||
277 | #define __NR_HPUX_msgctl 313 | ||
278 | #define __NR_HPUX_shmctl 314 | ||
279 | #define __NR_HPUX_mpctl 315 | ||
280 | #define __NR_HPUX_exportfs 316 | ||
281 | #define __NR_HPUX_getpmsg 317 | ||
282 | #define __NR_HPUX_putpmsg 318 | ||
283 | /* 319 missing */ | ||
284 | #define __NR_HPUX_msync 320 | ||
285 | #define __NR_HPUX_msleep 321 | ||
286 | #define __NR_HPUX_mwakeup 322 | ||
287 | #define __NR_HPUX_msem_init 323 | ||
288 | #define __NR_HPUX_msem_remove 324 | ||
289 | #define __NR_HPUX_adjtime 325 | ||
290 | #define __NR_HPUX_kload 326 | ||
291 | #define __NR_HPUX_fattach 327 | ||
292 | #define __NR_HPUX_fdetach 328 | ||
293 | #define __NR_HPUX_serialize 329 | ||
294 | #define __NR_HPUX_statvfs 330 | ||
295 | #define __NR_HPUX_fstatvfs 331 | ||
296 | #define __NR_HPUX_lchown 332 | ||
297 | #define __NR_HPUX_getsid 333 | ||
298 | #define __NR_HPUX_sysfs 334 | ||
299 | /* 335, 336 missing */ | ||
300 | #define __NR_HPUX_sched_setparam 337 | ||
301 | #define __NR_HPUX_sched_getparam 338 | ||
302 | #define __NR_HPUX_sched_setscheduler 339 | ||
303 | #define __NR_HPUX_sched_getscheduler 340 | ||
304 | #define __NR_HPUX_sched_yield 341 | ||
305 | #define __NR_HPUX_sched_get_priority_max 342 | ||
306 | #define __NR_HPUX_sched_get_priority_min 343 | ||
307 | #define __NR_HPUX_sched_rr_get_interval 344 | ||
308 | #define __NR_HPUX_clock_settime 345 | ||
309 | #define __NR_HPUX_clock_gettime 346 | ||
310 | #define __NR_HPUX_clock_getres 347 | ||
311 | #define __NR_HPUX_timer_create 348 | ||
312 | #define __NR_HPUX_timer_delete 349 | ||
313 | #define __NR_HPUX_timer_settime 350 | ||
314 | #define __NR_HPUX_timer_gettime 351 | ||
315 | #define __NR_HPUX_timer_getoverrun 352 | ||
316 | #define __NR_HPUX_nanosleep 353 | ||
317 | #define __NR_HPUX_toolbox 354 | ||
318 | /* 355 missing */ | ||
319 | #define __NR_HPUX_getdents 356 | ||
320 | #define __NR_HPUX_getcontext 357 | ||
321 | #define __NR_HPUX_sysinfo 358 | ||
322 | #define __NR_HPUX_fcntl64 359 | ||
323 | #define __NR_HPUX_ftruncate64 360 | ||
324 | #define __NR_HPUX_fstat64 361 | ||
325 | #define __NR_HPUX_getdirentries64 362 | ||
326 | #define __NR_HPUX_getrlimit64 363 | ||
327 | #define __NR_HPUX_lockf64 364 | ||
328 | #define __NR_HPUX_lseek64 365 | ||
329 | #define __NR_HPUX_lstat64 366 | ||
330 | #define __NR_HPUX_mmap64 367 | ||
331 | #define __NR_HPUX_setrlimit64 368 | ||
332 | #define __NR_HPUX_stat64 369 | ||
333 | #define __NR_HPUX_truncate64 370 | ||
334 | #define __NR_HPUX_ulimit64 371 | ||
335 | #define __NR_HPUX_pread 372 | ||
336 | #define __NR_HPUX_preadv 373 | ||
337 | #define __NR_HPUX_pwrite 374 | ||
338 | #define __NR_HPUX_pwritev 375 | ||
339 | #define __NR_HPUX_pread64 376 | ||
340 | #define __NR_HPUX_preadv64 377 | ||
341 | #define __NR_HPUX_pwrite64 378 | ||
342 | #define __NR_HPUX_pwritev64 379 | ||
343 | #define __NR_HPUX_setcontext 380 | ||
344 | #define __NR_HPUX_sigaltstack 381 | ||
345 | #define __NR_HPUX_waitid 382 | ||
346 | #define __NR_HPUX_setpgrp 383 | ||
347 | #define __NR_HPUX_recvmsg2 384 | ||
348 | #define __NR_HPUX_sendmsg2 385 | ||
349 | #define __NR_HPUX_socket2 386 | ||
350 | #define __NR_HPUX_socketpair2 387 | ||
351 | #define __NR_HPUX_setregid 388 | ||
352 | #define __NR_HPUX_lwp_create 389 | ||
353 | #define __NR_HPUX_lwp_terminate 390 | ||
354 | #define __NR_HPUX_lwp_wait 391 | ||
355 | #define __NR_HPUX_lwp_suspend 392 | ||
356 | #define __NR_HPUX_lwp_resume 393 | ||
357 | /* 394 missing */ | ||
358 | #define __NR_HPUX_lwp_abort_syscall 395 | ||
359 | #define __NR_HPUX_lwp_info 396 | ||
360 | #define __NR_HPUX_lwp_kill 397 | ||
361 | #define __NR_HPUX_ksleep 398 | ||
362 | #define __NR_HPUX_kwakeup 399 | ||
363 | /* 400 missing */ | ||
364 | #define __NR_HPUX_pstat_getlwp 401 | ||
365 | #define __NR_HPUX_lwp_exit 402 | ||
366 | #define __NR_HPUX_lwp_continue 403 | ||
367 | #define __NR_HPUX_getacl 404 | ||
368 | #define __NR_HPUX_fgetacl 405 | ||
369 | #define __NR_HPUX_setacl 406 | ||
370 | #define __NR_HPUX_fsetacl 407 | ||
371 | #define __NR_HPUX_getaccess 408 | ||
372 | #define __NR_HPUX_lwp_mutex_init 409 | ||
373 | #define __NR_HPUX_lwp_mutex_lock_sys 410 | ||
374 | #define __NR_HPUX_lwp_mutex_unlock 411 | ||
375 | #define __NR_HPUX_lwp_cond_init 412 | ||
376 | #define __NR_HPUX_lwp_cond_signal 413 | ||
377 | #define __NR_HPUX_lwp_cond_broadcast 414 | ||
378 | #define __NR_HPUX_lwp_cond_wait_sys 415 | ||
379 | #define __NR_HPUX_lwp_getscheduler 416 | ||
380 | #define __NR_HPUX_lwp_setscheduler 417 | ||
381 | #define __NR_HPUX_lwp_getstate 418 | ||
382 | #define __NR_HPUX_lwp_setstate 419 | ||
383 | #define __NR_HPUX_lwp_detach 420 | ||
384 | #define __NR_HPUX_mlock 421 | ||
385 | #define __NR_HPUX_munlock 422 | ||
386 | #define __NR_HPUX_mlockall 423 | ||
387 | #define __NR_HPUX_munlockall 424 | ||
388 | #define __NR_HPUX_shm_open 425 | ||
389 | #define __NR_HPUX_shm_unlink 426 | ||
390 | #define __NR_HPUX_sigqueue 427 | ||
391 | #define __NR_HPUX_sigwaitinfo 428 | ||
392 | #define __NR_HPUX_sigtimedwait 429 | ||
393 | #define __NR_HPUX_sigwait 430 | ||
394 | #define __NR_HPUX_aio_read 431 | ||
395 | #define __NR_HPUX_aio_write 432 | ||
396 | #define __NR_HPUX_lio_listio 433 | ||
397 | #define __NR_HPUX_aio_error 434 | ||
398 | #define __NR_HPUX_aio_return 435 | ||
399 | #define __NR_HPUX_aio_cancel 436 | ||
400 | #define __NR_HPUX_aio_suspend 437 | ||
401 | #define __NR_HPUX_aio_fsync 438 | ||
402 | #define __NR_HPUX_mq_open 439 | ||
403 | #define __NR_HPUX_mq_close 440 | ||
404 | #define __NR_HPUX_mq_unlink 441 | ||
405 | #define __NR_HPUX_mq_send 442 | ||
406 | #define __NR_HPUX_mq_receive 443 | ||
407 | #define __NR_HPUX_mq_notify 444 | ||
408 | #define __NR_HPUX_mq_setattr 445 | ||
409 | #define __NR_HPUX_mq_getattr 446 | ||
410 | #define __NR_HPUX_ksem_open 447 | ||
411 | #define __NR_HPUX_ksem_unlink 448 | ||
412 | #define __NR_HPUX_ksem_close 449 | ||
413 | #define __NR_HPUX_ksem_post 450 | ||
414 | #define __NR_HPUX_ksem_wait 451 | ||
415 | #define __NR_HPUX_ksem_read 452 | ||
416 | #define __NR_HPUX_ksem_trywait 453 | ||
417 | #define __NR_HPUX_lwp_rwlock_init 454 | ||
418 | #define __NR_HPUX_lwp_rwlock_destroy 455 | ||
419 | #define __NR_HPUX_lwp_rwlock_rdlock_sys 456 | ||
420 | #define __NR_HPUX_lwp_rwlock_wrlock_sys 457 | ||
421 | #define __NR_HPUX_lwp_rwlock_tryrdlock 458 | ||
422 | #define __NR_HPUX_lwp_rwlock_trywrlock 459 | ||
423 | #define __NR_HPUX_lwp_rwlock_unlock 460 | ||
424 | #define __NR_HPUX_ttrace 461 | ||
425 | #define __NR_HPUX_ttrace_wait 462 | ||
426 | #define __NR_HPUX_lf_wire_mem 463 | ||
427 | #define __NR_HPUX_lf_unwire_mem 464 | ||
428 | #define __NR_HPUX_lf_send_pin_map 465 | ||
429 | #define __NR_HPUX_lf_free_buf 466 | ||
430 | #define __NR_HPUX_lf_wait_nq 467 | ||
431 | #define __NR_HPUX_lf_wakeup_conn_q 468 | ||
432 | #define __NR_HPUX_lf_unused 469 | ||
433 | #define __NR_HPUX_lwp_sema_init 470 | ||
434 | #define __NR_HPUX_lwp_sema_post 471 | ||
435 | #define __NR_HPUX_lwp_sema_wait 472 | ||
436 | #define __NR_HPUX_lwp_sema_trywait 473 | ||
437 | #define __NR_HPUX_lwp_sema_destroy 474 | ||
438 | #define __NR_HPUX_statvfs64 475 | ||
439 | #define __NR_HPUX_fstatvfs64 476 | ||
440 | #define __NR_HPUX_msh_register 477 | ||
441 | #define __NR_HPUX_ptrace64 478 | ||
442 | #define __NR_HPUX_sendfile 479 | ||
443 | #define __NR_HPUX_sendpath 480 | ||
444 | #define __NR_HPUX_sendfile64 481 | ||
445 | #define __NR_HPUX_sendpath64 482 | ||
446 | #define __NR_HPUX_modload 483 | ||
447 | #define __NR_HPUX_moduload 484 | ||
448 | #define __NR_HPUX_modpath 485 | ||
449 | #define __NR_HPUX_getksym 486 | ||
450 | #define __NR_HPUX_modadm 487 | ||
451 | #define __NR_HPUX_modstat 488 | ||
452 | #define __NR_HPUX_lwp_detached_exit 489 | ||
453 | #define __NR_HPUX_crashconf 490 | ||
454 | #define __NR_HPUX_siginhibit 491 | ||
455 | #define __NR_HPUX_sigenable 492 | ||
456 | #define __NR_HPUX_spuctl 493 | ||
457 | #define __NR_HPUX_zerokernelsum 494 | ||
458 | #define __NR_HPUX_nfs_kstat 495 | ||
459 | #define __NR_HPUX_aio_read64 496 | ||
460 | #define __NR_HPUX_aio_write64 497 | ||
461 | #define __NR_HPUX_aio_error64 498 | ||
462 | #define __NR_HPUX_aio_return64 499 | ||
463 | #define __NR_HPUX_aio_cancel64 500 | ||
464 | #define __NR_HPUX_aio_suspend64 501 | ||
465 | #define __NR_HPUX_aio_fsync64 502 | ||
466 | #define __NR_HPUX_lio_listio64 503 | ||
467 | #define __NR_HPUX_recv2 504 | ||
468 | #define __NR_HPUX_recvfrom2 505 | ||
469 | #define __NR_HPUX_send2 506 | ||
470 | #define __NR_HPUX_sendto2 507 | ||
471 | #define __NR_HPUX_acl 508 | ||
472 | #define __NR_HPUX___cnx_p2p_ctl 509 | ||
473 | #define __NR_HPUX___cnx_gsched_ctl 510 | ||
474 | #define __NR_HPUX___cnx_pmon_ctl 511 | ||
475 | |||
476 | #define __NR_HPUX_syscalls 512 | ||
477 | |||
478 | /* | ||
479 | * Linux system call numbers. | 5 | * Linux system call numbers. |
480 | * | 6 | * |
481 | * Cary Coutant says that we should just use another syscall gateway | 7 | * Cary Coutant says that we should just use another syscall gateway |
@@ -484,9 +10,6 @@ | |||
484 | * very least. If we decide to change it later, we can ``just'' tweak | 10 | * very least. If we decide to change it later, we can ``just'' tweak |
485 | * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be | 11 | * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be |
486 | * 1024 or something. Oh, and recompile libc. =) | 12 | * 1024 or something. Oh, and recompile libc. =) |
487 | * | ||
488 | * 64-bit HPUX binaries get the syscall gateway address passed in a register | ||
489 | * from the kernel at startup, which seems a sane strategy. | ||
490 | */ | 13 | */ |
491 | 14 | ||
492 | #define __NR_Linux 0 | 15 | #define __NR_Linux 0 |
@@ -834,15 +357,15 @@ | |||
834 | #define __NR_getrandom (__NR_Linux + 339) | 357 | #define __NR_getrandom (__NR_Linux + 339) |
835 | #define __NR_memfd_create (__NR_Linux + 340) | 358 | #define __NR_memfd_create (__NR_Linux + 340) |
836 | #define __NR_bpf (__NR_Linux + 341) | 359 | #define __NR_bpf (__NR_Linux + 341) |
360 | #define __NR_execveat (__NR_Linux + 342) | ||
837 | 361 | ||
838 | #define __NR_Linux_syscalls (__NR_bpf + 1) | 362 | #define __NR_Linux_syscalls (__NR_execveat + 1) |
839 | 363 | ||
840 | 364 | ||
841 | #define __IGNORE_select /* newselect */ | 365 | #define __IGNORE_select /* newselect */ |
842 | #define __IGNORE_fadvise64 /* fadvise64_64 */ | 366 | #define __IGNORE_fadvise64 /* fadvise64_64 */ |
843 | 367 | ||
844 | 368 | ||
845 | #define HPUX_GATEWAY_ADDR 0xC0000004 | ||
846 | #define LINUX_GATEWAY_ADDR 0x100 | 369 | #define LINUX_GATEWAY_ADDR 0x100 |
847 | 370 | ||
848 | #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */ | 371 | #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */ |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index e8f07dd28401..2ab16bb160a8 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -1774,10 +1774,6 @@ ENTRY(sys_rt_sigreturn_wrapper) | |||
1774 | ENDPROC(sys_rt_sigreturn_wrapper) | 1774 | ENDPROC(sys_rt_sigreturn_wrapper) |
1775 | 1775 | ||
1776 | ENTRY(syscall_exit) | 1776 | ENTRY(syscall_exit) |
1777 | /* NOTE: HP-UX syscalls also come through here | ||
1778 | * after hpux_syscall_exit fixes up return | ||
1779 | * values. */ | ||
1780 | |||
1781 | /* NOTE: Not all syscalls exit this way. rt_sigreturn will exit | 1777 | /* NOTE: Not all syscalls exit this way. rt_sigreturn will exit |
1782 | * via syscall_exit_rfi if the signal was received while the process | 1778 | * via syscall_exit_rfi if the signal was received while the process |
1783 | * was running. | 1779 | * was running. |
@@ -1789,22 +1785,6 @@ ENTRY(syscall_exit) | |||
1789 | LDREG TI_TASK(%r1),%r1 | 1785 | LDREG TI_TASK(%r1),%r1 |
1790 | STREG %r28,TASK_PT_GR28(%r1) | 1786 | STREG %r28,TASK_PT_GR28(%r1) |
1791 | 1787 | ||
1792 | #ifdef CONFIG_HPUX | ||
1793 | /* <linux/personality.h> cannot be easily included */ | ||
1794 | #define PER_HPUX 0x10 | ||
1795 | ldw TASK_PERSONALITY(%r1),%r19 | ||
1796 | |||
1797 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ | ||
1798 | ldo -PER_HPUX(%r19), %r19 | ||
1799 | cmpib,COND(<>),n 0,%r19,1f | ||
1800 | |||
1801 | /* Save other hpux returns if personality is PER_HPUX */ | ||
1802 | STREG %r22,TASK_PT_GR22(%r1) | ||
1803 | STREG %r29,TASK_PT_GR29(%r1) | ||
1804 | 1: | ||
1805 | |||
1806 | #endif /* CONFIG_HPUX */ | ||
1807 | |||
1808 | /* Seems to me that dp could be wrong here, if the syscall involved | 1788 | /* Seems to me that dp could be wrong here, if the syscall involved |
1809 | * calling a module, and nothing got round to restoring dp on return. | 1789 | * calling a module, and nothing got round to restoring dp on return. |
1810 | */ | 1790 | */ |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 0bbbf0d3f608..8a488c22a99f 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -193,9 +193,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
193 | * Make them const so the compiler knows they live in .text */ | 193 | * Make them const so the compiler knows they live in .text */ |
194 | extern void * const ret_from_kernel_thread; | 194 | extern void * const ret_from_kernel_thread; |
195 | extern void * const child_return; | 195 | extern void * const child_return; |
196 | #ifdef CONFIG_HPUX | 196 | |
197 | extern void * const hpux_child_return; | ||
198 | #endif | ||
199 | if (unlikely(p->flags & PF_KTHREAD)) { | 197 | if (unlikely(p->flags & PF_KTHREAD)) { |
200 | memset(cregs, 0, sizeof(struct pt_regs)); | 198 | memset(cregs, 0, sizeof(struct pt_regs)); |
201 | if (!usp) /* idle thread */ | 199 | if (!usp) /* idle thread */ |
@@ -229,15 +227,8 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
229 | cregs->gr[30] = usp; | 227 | cregs->gr[30] = usp; |
230 | } | 228 | } |
231 | cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; | 229 | cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; |
232 | if (personality(p->personality) == PER_HPUX) { | 230 | cregs->kpc = (unsigned long) &child_return; |
233 | #ifdef CONFIG_HPUX | 231 | |
234 | cregs->kpc = (unsigned long) &hpux_child_return; | ||
235 | #else | ||
236 | BUG(); | ||
237 | #endif | ||
238 | } else { | ||
239 | cregs->kpc = (unsigned long) &child_return; | ||
240 | } | ||
241 | /* Setup thread TLS area from the 4th parameter in clone */ | 232 | /* Setup thread TLS area from the 4th parameter in clone */ |
242 | if (clone_flags & CLONE_SETTLS) | 233 | if (clone_flags & CLONE_SETTLS) |
243 | cregs->cr27 = cregs->gr[23]; | 234 | cregs->cr27 = cregs->gr[23]; |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 9b910a0251b8..dc1ea796fd60 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -9,8 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Like the IA-64, we are a recent enough port (we are *starting* | 10 | * Like the IA-64, we are a recent enough port (we are *starting* |
11 | * with glibc2.2) that we do not need to support the old non-realtime | 11 | * with glibc2.2) that we do not need to support the old non-realtime |
12 | * Linux signals. Therefore we don't. HP/UX signals will go in | 12 | * Linux signals. Therefore we don't. |
13 | * arch/parisc/hpux/signal.c when we figure out how to do them. | ||
14 | */ | 13 | */ |
15 | 14 | ||
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
@@ -476,6 +475,9 @@ insert_restart_trampoline(struct pt_regs *regs) | |||
476 | case -ERESTART_RESTARTBLOCK: { | 475 | case -ERESTART_RESTARTBLOCK: { |
477 | /* Restart the system call - no handlers present */ | 476 | /* Restart the system call - no handlers present */ |
478 | unsigned int *usp = (unsigned int *)regs->gr[30]; | 477 | unsigned int *usp = (unsigned int *)regs->gr[30]; |
478 | unsigned long start = (unsigned long) &usp[2]; | ||
479 | unsigned long end = (unsigned long) &usp[5]; | ||
480 | long err = 0; | ||
479 | 481 | ||
480 | /* Setup a trampoline to restart the syscall | 482 | /* Setup a trampoline to restart the syscall |
481 | * with __NR_restart_syscall | 483 | * with __NR_restart_syscall |
@@ -487,23 +489,21 @@ insert_restart_trampoline(struct pt_regs *regs) | |||
487 | * 16: ldi __NR_restart_syscall, %r20 | 489 | * 16: ldi __NR_restart_syscall, %r20 |
488 | */ | 490 | */ |
489 | #ifdef CONFIG_64BIT | 491 | #ifdef CONFIG_64BIT |
490 | put_user(regs->gr[31] >> 32, &usp[0]); | 492 | err |= put_user(regs->gr[31] >> 32, &usp[0]); |
491 | put_user(regs->gr[31] & 0xffffffff, &usp[1]); | 493 | err |= put_user(regs->gr[31] & 0xffffffff, &usp[1]); |
492 | put_user(0x0fc010df, &usp[2]); | 494 | err |= put_user(0x0fc010df, &usp[2]); |
493 | #else | 495 | #else |
494 | put_user(regs->gr[31], &usp[0]); | 496 | err |= put_user(regs->gr[31], &usp[0]); |
495 | put_user(0x0fc0109f, &usp[2]); | 497 | err |= put_user(0x0fc0109f, &usp[2]); |
496 | #endif | 498 | #endif |
497 | put_user(0xe0008200, &usp[3]); | 499 | err |= put_user(0xe0008200, &usp[3]); |
498 | put_user(0x34140000, &usp[4]); | 500 | err |= put_user(0x34140000, &usp[4]); |
499 | 501 | ||
500 | /* Stack is 64-byte aligned, and we only need | 502 | WARN_ON(err); |
501 | * to flush 1 cache line. | 503 | |
502 | * Flushing one cacheline is cheap. | 504 | /* flush data/instruction cache for new insns */ |
503 | * "sync" on bigger (> 4 way) boxes is not. | 505 | flush_user_dcache_range(start, end); |
504 | */ | 506 | flush_user_icache_range(start, end); |
505 | flush_user_dcache_range(regs->gr[30], regs->gr[30] + 4); | ||
506 | flush_user_icache_range(regs->gr[30], regs->gr[30] + 4); | ||
507 | 507 | ||
508 | regs->gr[31] = regs->gr[30] + 8; | 508 | regs->gr[31] = regs->gr[30] + 8; |
509 | return; | 509 | return; |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index ceda229ea6c2..52e85973a283 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -230,9 +230,6 @@ send_IPI_allbutself(enum ipi_message_type op) | |||
230 | inline void | 230 | inline void |
231 | smp_send_stop(void) { send_IPI_allbutself(IPI_CPU_STOP); } | 231 | smp_send_stop(void) { send_IPI_allbutself(IPI_CPU_STOP); } |
232 | 232 | ||
233 | static inline void | ||
234 | smp_send_start(void) { send_IPI_allbutself(IPI_CPU_START); } | ||
235 | |||
236 | void | 233 | void |
237 | smp_send_reschedule(int cpu) { send_IPI_single(cpu, IPI_RESCHEDULE); } | 234 | smp_send_reschedule(int cpu) { send_IPI_single(cpu, IPI_RESCHEDULE); } |
238 | 235 | ||
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index fe4f0b89bf8f..5a8997d63899 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -437,6 +437,7 @@ | |||
437 | ENTRY_SAME(getrandom) | 437 | ENTRY_SAME(getrandom) |
438 | ENTRY_SAME(memfd_create) /* 340 */ | 438 | ENTRY_SAME(memfd_create) /* 340 */ |
439 | ENTRY_SAME(bpf) | 439 | ENTRY_SAME(bpf) |
440 | ENTRY_COMP(execveat) | ||
440 | 441 | ||
441 | /* Nothing yet */ | 442 | /* Nothing yet */ |
442 | 443 | ||
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 0bef864264c0..15dbe81cf5f3 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -750,78 +750,6 @@ static void __init gateway_init(void) | |||
750 | PAGE_SIZE, PAGE_GATEWAY, 1); | 750 | PAGE_SIZE, PAGE_GATEWAY, 1); |
751 | } | 751 | } |
752 | 752 | ||
753 | #ifdef CONFIG_HPUX | ||
754 | void | ||
755 | map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm) | ||
756 | { | ||
757 | pgd_t *pg_dir; | ||
758 | pmd_t *pmd; | ||
759 | pte_t *pg_table; | ||
760 | unsigned long start_pmd; | ||
761 | unsigned long start_pte; | ||
762 | unsigned long address; | ||
763 | unsigned long hpux_gw_page_addr; | ||
764 | /* FIXME: This is 'const' in order to trick the compiler | ||
765 | into not treating it as DP-relative data. */ | ||
766 | extern void * const hpux_gateway_page; | ||
767 | |||
768 | hpux_gw_page_addr = HPUX_GATEWAY_ADDR & PAGE_MASK; | ||
769 | |||
770 | /* | ||
771 | * Setup HP-UX Gateway page. | ||
772 | * | ||
773 | * The HP-UX gateway page resides in the user address space, | ||
774 | * so it needs to be aliased into each process. | ||
775 | */ | ||
776 | |||
777 | pg_dir = pgd_offset(mm,hpux_gw_page_addr); | ||
778 | |||
779 | #if PTRS_PER_PMD == 1 | ||
780 | start_pmd = 0; | ||
781 | #else | ||
782 | start_pmd = ((hpux_gw_page_addr >> PMD_SHIFT) & (PTRS_PER_PMD - 1)); | ||
783 | #endif | ||
784 | start_pte = ((hpux_gw_page_addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); | ||
785 | |||
786 | address = __pa(&hpux_gateway_page); | ||
787 | #if PTRS_PER_PMD == 1 | ||
788 | pmd = (pmd_t *)__pa(pg_dir); | ||
789 | #else | ||
790 | pmd = (pmd_t *) pgd_address(*pg_dir); | ||
791 | |||
792 | /* | ||
793 | * pmd is physical at this point | ||
794 | */ | ||
795 | |||
796 | if (!pmd) { | ||
797 | pmd = (pmd_t *) get_zeroed_page(GFP_KERNEL); | ||
798 | pmd = (pmd_t *) __pa(pmd); | ||
799 | } | ||
800 | |||
801 | __pgd_val_set(*pg_dir, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pmd); | ||
802 | #endif | ||
803 | /* now change pmd to kernel virtual addresses */ | ||
804 | |||
805 | pmd = (pmd_t *)__va(pmd) + start_pmd; | ||
806 | |||
807 | /* | ||
808 | * pg_table is physical at this point | ||
809 | */ | ||
810 | |||
811 | pg_table = (pte_t *) pmd_address(*pmd); | ||
812 | if (!pg_table) | ||
813 | pg_table = (pte_t *) __pa(get_zeroed_page(GFP_KERNEL)); | ||
814 | |||
815 | __pmd_val_set(*pmd, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pg_table); | ||
816 | |||
817 | /* now change pg_table to kernel virtual addresses */ | ||
818 | |||
819 | pg_table = (pte_t *) __va(pg_table) + start_pte; | ||
820 | set_pte(pg_table, __mk_pte(address, PAGE_GATEWAY)); | ||
821 | } | ||
822 | EXPORT_SYMBOL(map_hpux_gateway_page); | ||
823 | #endif | ||
824 | |||
825 | void __init paging_init(void) | 753 | void __init paging_init(void) |
826 | { | 754 | { |
827 | int i; | 755 | int i; |