diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2012-07-14 03:22:05 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-10-29 16:25:02 -0400 |
commit | 46e12c07b3b9603c60fc1d421ff18618241cb081 (patch) | |
tree | a969d44689686676318e9ff07f3602a5ff969d56 /arch/mips/kernel/scall32-o32.S | |
parent | 19e2e172f0ed2552793ecef506b00c3fa3421845 (diff) |
MIPS: O32 / 32-bit: Always copy 4 stack arguments.
This gets us rid of the hard to maintain table of the number of syscall
arguments and paves the way for further restructuring of the syscall
code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/scall32-o32.S')
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 832 |
1 files changed, 400 insertions, 432 deletions
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index c0a53f2a5440..e8e541b40d86 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -40,17 +40,58 @@ NESTED(handle_sys, PT_SIZE, sp) | |||
40 | sw t1, PT_EPC(sp) | 40 | sw t1, PT_EPC(sp) |
41 | beqz t0, illegal_syscall | 41 | beqz t0, illegal_syscall |
42 | 42 | ||
43 | sll t0, v0, 3 | 43 | sll t0, v0, 2 |
44 | la t1, sys_call_table | 44 | la t1, sys_call_table |
45 | addu t1, t0 | 45 | addu t1, t0 |
46 | lw t2, (t1) # syscall routine | 46 | lw t2, (t1) # syscall routine |
47 | lw t3, 4(t1) # >= 0 if we need stack arguments | ||
48 | beqz t2, illegal_syscall | 47 | beqz t2, illegal_syscall |
49 | 48 | ||
50 | sw a3, PT_R26(sp) # save a3 for syscall restarting | 49 | sw a3, PT_R26(sp) # save a3 for syscall restarting |
51 | bgez t3, stackargs | ||
52 | 50 | ||
53 | stack_done: | 51 | /* |
52 | * More than four arguments. Try to deal with it by copying the | ||
53 | * stack arguments from the user stack to the kernel stack. | ||
54 | * This Sucks (TM). | ||
55 | */ | ||
56 | lw t0, PT_R29(sp) # get old user stack pointer | ||
57 | |||
58 | /* | ||
59 | * We intentionally keep the kernel stack a little below the top of | ||
60 | * userspace so we don't have to do a slower byte accurate check here. | ||
61 | */ | ||
62 | lw t5, TI_ADDR_LIMIT($28) | ||
63 | addu t4, t0, 32 | ||
64 | and t5, t4 | ||
65 | bltz t5, bad_stack # -> sp is bad | ||
66 | |||
67 | /* | ||
68 | * Ok, copy the args from the luser stack to the kernel stack. | ||
69 | * t3 is the precomputed number of instruction bytes needed to | ||
70 | * load or store arguments 6-8. | ||
71 | */ | ||
72 | |||
73 | .set push | ||
74 | .set noreorder | ||
75 | .set nomacro | ||
76 | |||
77 | 1: lw t5, 16(t0) # argument #5 from usp | ||
78 | 4: lw t6, 20(t0) # argument #6 from usp | ||
79 | 3: lw t7, 24(t0) # argument #7 from usp | ||
80 | 2: lw t8, 28(t0) # argument #8 from usp | ||
81 | |||
82 | sw t5, 16(sp) # argument #5 to ksp | ||
83 | sw t6, 20(sp) # argument #6 to ksp | ||
84 | sw t7, 24(sp) # argument #7 to ksp | ||
85 | sw t8, 28(sp) # argument #8 to ksp | ||
86 | .set pop | ||
87 | |||
88 | .section __ex_table,"a" | ||
89 | PTR 1b,bad_stack | ||
90 | PTR 2b,bad_stack | ||
91 | PTR 3b,bad_stack | ||
92 | PTR 4b,bad_stack | ||
93 | .previous | ||
94 | |||
54 | lw t0, TI_FLAGS($28) # syscall tracing enabled? | 95 | lw t0, TI_FLAGS($28) # syscall tracing enabled? |
55 | li t1, _TIF_WORK_SYSCALL_ENTRY | 96 | li t1, _TIF_WORK_SYSCALL_ENTRY |
56 | and t0, t1 | 97 | and t0, t1 |
@@ -102,66 +143,6 @@ syscall_trace_entry: | |||
102 | /* ------------------------------------------------------------------------ */ | 143 | /* ------------------------------------------------------------------------ */ |
103 | 144 | ||
104 | /* | 145 | /* |
105 | * More than four arguments. Try to deal with it by copying the | ||
106 | * stack arguments from the user stack to the kernel stack. | ||
107 | * This Sucks (TM). | ||
108 | */ | ||
109 | stackargs: | ||
110 | lw t0, PT_R29(sp) # get old user stack pointer | ||
111 | |||
112 | /* | ||
113 | * We intentionally keep the kernel stack a little below the top of | ||
114 | * userspace so we don't have to do a slower byte accurate check here. | ||
115 | */ | ||
116 | lw t5, TI_ADDR_LIMIT($28) | ||
117 | addu t4, t0, 32 | ||
118 | and t5, t4 | ||
119 | bltz t5, bad_stack # -> sp is bad | ||
120 | |||
121 | /* Ok, copy the args from the luser stack to the kernel stack. | ||
122 | * t3 is the precomputed number of instruction bytes needed to | ||
123 | * load or store arguments 6-8. | ||
124 | */ | ||
125 | |||
126 | la t1, 5f # load up to 3 arguments | ||
127 | subu t1, t3 | ||
128 | 1: lw t5, 16(t0) # argument #5 from usp | ||
129 | .set push | ||
130 | .set noreorder | ||
131 | .set nomacro | ||
132 | jr t1 | ||
133 | addiu t1, 6f - 5f | ||
134 | |||
135 | 2: lw t8, 28(t0) # argument #8 from usp | ||
136 | 3: lw t7, 24(t0) # argument #7 from usp | ||
137 | 4: lw t6, 20(t0) # argument #6 from usp | ||
138 | 5: jr t1 | ||
139 | sw t5, 16(sp) # argument #5 to ksp | ||
140 | |||
141 | #ifdef CONFIG_CPU_MICROMIPS | ||
142 | sw t8, 28(sp) # argument #8 to ksp | ||
143 | nop | ||
144 | sw t7, 24(sp) # argument #7 to ksp | ||
145 | nop | ||
146 | sw t6, 20(sp) # argument #6 to ksp | ||
147 | nop | ||
148 | #else | ||
149 | sw t8, 28(sp) # argument #8 to ksp | ||
150 | sw t7, 24(sp) # argument #7 to ksp | ||
151 | sw t6, 20(sp) # argument #6 to ksp | ||
152 | #endif | ||
153 | 6: j stack_done # go back | ||
154 | nop | ||
155 | .set pop | ||
156 | |||
157 | .section __ex_table,"a" | ||
158 | PTR 1b,bad_stack | ||
159 | PTR 2b,bad_stack | ||
160 | PTR 3b,bad_stack | ||
161 | PTR 4b,bad_stack | ||
162 | .previous | ||
163 | |||
164 | /* | ||
165 | * The stackpointer for a call with more than 4 arguments is bad. | 146 | * The stackpointer for a call with more than 4 arguments is bad. |
166 | * We probably should handle this case a bit more drastic. | 147 | * We probably should handle this case a bit more drastic. |
167 | */ | 148 | */ |
@@ -187,7 +168,7 @@ illegal_syscall: | |||
187 | subu t0, a0, __NR_O32_Linux # check syscall number | 168 | subu t0, a0, __NR_O32_Linux # check syscall number |
188 | sltiu v0, t0, __NR_O32_Linux_syscalls + 1 | 169 | sltiu v0, t0, __NR_O32_Linux_syscalls + 1 |
189 | beqz t0, einval # do not recurse | 170 | beqz t0, einval # do not recurse |
190 | sll t1, t0, 3 | 171 | sll t1, t0, 2 |
191 | beqz v0, einval | 172 | beqz v0, einval |
192 | lw t2, sys_call_table(t1) # syscall routine | 173 | lw t2, sys_call_table(t1) # syscall routine |
193 | 174 | ||
@@ -218,246 +199,248 @@ einval: li v0, -ENOSYS | |||
218 | jr ra | 199 | jr ra |
219 | END(sys_syscall) | 200 | END(sys_syscall) |
220 | 201 | ||
221 | .macro syscalltable | 202 | .align 2 |
222 | sys sys_syscall 8 /* 4000 */ | 203 | .type sys_call_table, @object |
223 | sys sys_exit 1 | 204 | EXPORT(sys_call_table) |
224 | sys __sys_fork 0 | 205 | PTR sys_syscall /* 4000 */ |
225 | sys sys_read 3 | 206 | PTR sys_exit |
226 | sys sys_write 3 | 207 | PTR __sys_fork |
227 | sys sys_open 3 /* 4005 */ | 208 | PTR sys_read |
228 | sys sys_close 1 | 209 | PTR sys_write |
229 | sys sys_waitpid 3 | 210 | PTR sys_open /* 4005 */ |
230 | sys sys_creat 2 | 211 | PTR sys_close |
231 | sys sys_link 2 | 212 | PTR sys_waitpid |
232 | sys sys_unlink 1 /* 4010 */ | 213 | PTR sys_creat |
233 | sys sys_execve 0 | 214 | PTR sys_link |
234 | sys sys_chdir 1 | 215 | PTR sys_unlink /* 4010 */ |
235 | sys sys_time 1 | 216 | PTR sys_execve |
236 | sys sys_mknod 3 | 217 | PTR sys_chdir |
237 | sys sys_chmod 2 /* 4015 */ | 218 | PTR sys_time |
238 | sys sys_lchown 3 | 219 | PTR sys_mknod |
239 | sys sys_ni_syscall 0 | 220 | PTR sys_chmod /* 4015 */ |
240 | sys sys_ni_syscall 0 /* was sys_stat */ | 221 | PTR sys_lchown |
241 | sys sys_lseek 3 | 222 | PTR sys_ni_syscall |
242 | sys sys_getpid 0 /* 4020 */ | 223 | PTR sys_ni_syscall /* was sys_stat */ |
243 | sys sys_mount 5 | 224 | PTR sys_lseek |
244 | sys sys_oldumount 1 | 225 | PTR sys_getpid /* 4020 */ |
245 | sys sys_setuid 1 | 226 | PTR sys_mount |
246 | sys sys_getuid 0 | 227 | PTR sys_oldumount |
247 | sys sys_stime 1 /* 4025 */ | 228 | PTR sys_setuid |
248 | sys sys_ptrace 4 | 229 | PTR sys_getuid |
249 | sys sys_alarm 1 | 230 | PTR sys_stime /* 4025 */ |
250 | sys sys_ni_syscall 0 /* was sys_fstat */ | 231 | PTR sys_ptrace |
251 | sys sys_pause 0 | 232 | PTR sys_alarm |
252 | sys sys_utime 2 /* 4030 */ | 233 | PTR sys_ni_syscall /* was sys_fstat */ |
253 | sys sys_ni_syscall 0 | 234 | PTR sys_pause |
254 | sys sys_ni_syscall 0 | 235 | PTR sys_utime /* 4030 */ |
255 | sys sys_access 2 | 236 | PTR sys_ni_syscall |
256 | sys sys_nice 1 | 237 | PTR sys_ni_syscall |
257 | sys sys_ni_syscall 0 /* 4035 */ | 238 | PTR sys_access |
258 | sys sys_sync 0 | 239 | PTR sys_nice |
259 | sys sys_kill 2 | 240 | PTR sys_ni_syscall /* 4035 */ |
260 | sys sys_rename 2 | 241 | PTR sys_sync |
261 | sys sys_mkdir 2 | 242 | PTR sys_kill |
262 | sys sys_rmdir 1 /* 4040 */ | 243 | PTR sys_rename |
263 | sys sys_dup 1 | 244 | PTR sys_mkdir |
264 | sys sysm_pipe 0 | 245 | PTR sys_rmdir /* 4040 */ |
265 | sys sys_times 1 | 246 | PTR sys_dup |
266 | sys sys_ni_syscall 0 | 247 | PTR sysm_pipe |
267 | sys sys_brk 1 /* 4045 */ | 248 | PTR sys_times |
268 | sys sys_setgid 1 | 249 | PTR sys_ni_syscall |
269 | sys sys_getgid 0 | 250 | PTR sys_brk /* 4045 */ |
270 | sys sys_ni_syscall 0 /* was signal(2) */ | 251 | PTR sys_setgid |
271 | sys sys_geteuid 0 | 252 | PTR sys_getgid |
272 | sys sys_getegid 0 /* 4050 */ | 253 | PTR sys_ni_syscall /* was signal(2) */ |
273 | sys sys_acct 1 | 254 | PTR sys_geteuid |
274 | sys sys_umount 2 | 255 | PTR sys_getegid /* 4050 */ |
275 | sys sys_ni_syscall 0 | 256 | PTR sys_acct |
276 | sys sys_ioctl 3 | 257 | PTR sys_umount |
277 | sys sys_fcntl 3 /* 4055 */ | 258 | PTR sys_ni_syscall |
278 | sys sys_ni_syscall 2 | 259 | PTR sys_ioctl |
279 | sys sys_setpgid 2 | 260 | PTR sys_fcntl /* 4055 */ |
280 | sys sys_ni_syscall 0 | 261 | PTR sys_ni_syscall |
281 | sys sys_olduname 1 | 262 | PTR sys_setpgid |
282 | sys sys_umask 1 /* 4060 */ | 263 | PTR sys_ni_syscall |
283 | sys sys_chroot 1 | 264 | PTR sys_olduname |
284 | sys sys_ustat 2 | 265 | PTR sys_umask /* 4060 */ |
285 | sys sys_dup2 2 | 266 | PTR sys_chroot |
286 | sys sys_getppid 0 | 267 | PTR sys_ustat |
287 | sys sys_getpgrp 0 /* 4065 */ | 268 | PTR sys_dup2 |
288 | sys sys_setsid 0 | 269 | PTR sys_getppid |
289 | sys sys_sigaction 3 | 270 | PTR sys_getpgrp /* 4065 */ |
290 | sys sys_sgetmask 0 | 271 | PTR sys_setsid |
291 | sys sys_ssetmask 1 | 272 | PTR sys_sigaction |
292 | sys sys_setreuid 2 /* 4070 */ | 273 | PTR sys_sgetmask |
293 | sys sys_setregid 2 | 274 | PTR sys_ssetmask |
294 | sys sys_sigsuspend 0 | 275 | PTR sys_setreuid /* 4070 */ |
295 | sys sys_sigpending 1 | 276 | PTR sys_setregid |
296 | sys sys_sethostname 2 | 277 | PTR sys_sigsuspend |
297 | sys sys_setrlimit 2 /* 4075 */ | 278 | PTR sys_sigpending |
298 | sys sys_getrlimit 2 | 279 | PTR sys_sethostname |
299 | sys sys_getrusage 2 | 280 | PTR sys_setrlimit /* 4075 */ |
300 | sys sys_gettimeofday 2 | 281 | PTR sys_getrlimit |
301 | sys sys_settimeofday 2 | 282 | PTR sys_getrusage |
302 | sys sys_getgroups 2 /* 4080 */ | 283 | PTR sys_gettimeofday |
303 | sys sys_setgroups 2 | 284 | PTR sys_settimeofday |
304 | sys sys_ni_syscall 0 /* old_select */ | 285 | PTR sys_getgroups /* 4080 */ |
305 | sys sys_symlink 2 | 286 | PTR sys_setgroups |
306 | sys sys_ni_syscall 0 /* was sys_lstat */ | 287 | PTR sys_ni_syscall /* old_select */ |
307 | sys sys_readlink 3 /* 4085 */ | 288 | PTR sys_symlink |
308 | sys sys_uselib 1 | 289 | PTR sys_ni_syscall /* was sys_lstat */ |
309 | sys sys_swapon 2 | 290 | PTR sys_readlink /* 4085 */ |
310 | sys sys_reboot 3 | 291 | PTR sys_uselib |
311 | sys sys_old_readdir 3 | 292 | PTR sys_swapon |
312 | sys sys_mips_mmap 6 /* 4090 */ | 293 | PTR sys_reboot |
313 | sys sys_munmap 2 | 294 | PTR sys_old_readdir |
314 | sys sys_truncate 2 | 295 | PTR sys_mips_mmap /* 4090 */ |
315 | sys sys_ftruncate 2 | 296 | PTR sys_munmap |
316 | sys sys_fchmod 2 | 297 | PTR sys_truncate |
317 | sys sys_fchown 3 /* 4095 */ | 298 | PTR sys_ftruncate |
318 | sys sys_getpriority 2 | 299 | PTR sys_fchmod |
319 | sys sys_setpriority 3 | 300 | PTR sys_fchown /* 4095 */ |
320 | sys sys_ni_syscall 0 | 301 | PTR sys_getpriority |
321 | sys sys_statfs 2 | 302 | PTR sys_setpriority |
322 | sys sys_fstatfs 2 /* 4100 */ | 303 | PTR sys_ni_syscall |
323 | sys sys_ni_syscall 0 /* was ioperm(2) */ | 304 | PTR sys_statfs |
324 | sys sys_socketcall 2 | 305 | PTR sys_fstatfs /* 4100 */ |
325 | sys sys_syslog 3 | 306 | PTR sys_ni_syscall /* was ioperm(2) */ |
326 | sys sys_setitimer 3 | 307 | PTR sys_socketcall |
327 | sys sys_getitimer 2 /* 4105 */ | 308 | PTR sys_syslog |
328 | sys sys_newstat 2 | 309 | PTR sys_setitimer |
329 | sys sys_newlstat 2 | 310 | PTR sys_getitimer /* 4105 */ |
330 | sys sys_newfstat 2 | 311 | PTR sys_newstat |
331 | sys sys_uname 1 | 312 | PTR sys_newlstat |
332 | sys sys_ni_syscall 0 /* 4110 was iopl(2) */ | 313 | PTR sys_newfstat |
333 | sys sys_vhangup 0 | 314 | PTR sys_uname |
334 | sys sys_ni_syscall 0 /* was sys_idle() */ | 315 | PTR sys_ni_syscall /* 4110 was iopl(2) */ |
335 | sys sys_ni_syscall 0 /* was sys_vm86 */ | 316 | PTR sys_vhangup |
336 | sys sys_wait4 4 | 317 | PTR sys_ni_syscall /* was sys_idle() */ |
337 | sys sys_swapoff 1 /* 4115 */ | 318 | PTR sys_ni_syscall /* was sys_vm86 */ |
338 | sys sys_sysinfo 1 | 319 | PTR sys_wait4 |
339 | sys sys_ipc 6 | 320 | PTR sys_swapoff /* 4115 */ |
340 | sys sys_fsync 1 | 321 | PTR sys_sysinfo |
341 | sys sys_sigreturn 0 | 322 | PTR sys_ipc |
342 | sys __sys_clone 6 /* 4120 */ | 323 | PTR sys_fsync |
343 | sys sys_setdomainname 2 | 324 | PTR sys_sigreturn |
344 | sys sys_newuname 1 | 325 | PTR __sys_clone /* 4120 */ |
345 | sys sys_ni_syscall 0 /* sys_modify_ldt */ | 326 | PTR sys_setdomainname |
346 | sys sys_adjtimex 1 | 327 | PTR sys_newuname |
347 | sys sys_mprotect 3 /* 4125 */ | 328 | PTR sys_ni_syscall /* sys_modify_ldt */ |
348 | sys sys_sigprocmask 3 | 329 | PTR sys_adjtimex |
349 | sys sys_ni_syscall 0 /* was create_module */ | 330 | PTR sys_mprotect /* 4125 */ |
350 | sys sys_init_module 5 | 331 | PTR sys_sigprocmask |
351 | sys sys_delete_module 1 | 332 | PTR sys_ni_syscall /* was create_module */ |
352 | sys sys_ni_syscall 0 /* 4130 was get_kernel_syms */ | 333 | PTR sys_init_module |
353 | sys sys_quotactl 4 | 334 | PTR sys_delete_module |
354 | sys sys_getpgid 1 | 335 | PTR sys_ni_syscall /* 4130 was get_kernel_syms */ |
355 | sys sys_fchdir 1 | 336 | PTR sys_quotactl |
356 | sys sys_bdflush 2 | 337 | PTR sys_getpgid |
357 | sys sys_sysfs 3 /* 4135 */ | 338 | PTR sys_fchdir |
358 | sys sys_personality 1 | 339 | PTR sys_bdflush |
359 | sys sys_ni_syscall 0 /* for afs_syscall */ | 340 | PTR sys_sysfs /* 4135 */ |
360 | sys sys_setfsuid 1 | 341 | PTR sys_personality |
361 | sys sys_setfsgid 1 | 342 | PTR sys_ni_syscall /* for afs_syscall */ |
362 | sys sys_llseek 5 /* 4140 */ | 343 | PTR sys_setfsuid |
363 | sys sys_getdents 3 | 344 | PTR sys_setfsgid |
364 | sys sys_select 5 | 345 | PTR sys_llseek /* 4140 */ |
365 | sys sys_flock 2 | 346 | PTR sys_getdents |
366 | sys sys_msync 3 | 347 | PTR sys_select |
367 | sys sys_readv 3 /* 4145 */ | 348 | PTR sys_flock |
368 | sys sys_writev 3 | 349 | PTR sys_msync |
369 | sys sys_cacheflush 3 | 350 | PTR sys_readv /* 4145 */ |
370 | sys sys_cachectl 3 | 351 | PTR sys_writev |
371 | sys sys_sysmips 4 | 352 | PTR sys_cacheflush |
372 | sys sys_ni_syscall 0 /* 4150 */ | 353 | PTR sys_cachectl |
373 | sys sys_getsid 1 | 354 | PTR sys_sysmips |
374 | sys sys_fdatasync 1 | 355 | PTR sys_ni_syscall /* 4150 */ |
375 | sys sys_sysctl 1 | 356 | PTR sys_getsid |
376 | sys sys_mlock 2 | 357 | PTR sys_fdatasync |
377 | sys sys_munlock 2 /* 4155 */ | 358 | PTR sys_sysctl |
378 | sys sys_mlockall 1 | 359 | PTR sys_mlock |
379 | sys sys_munlockall 0 | 360 | PTR sys_munlock /* 4155 */ |
380 | sys sys_sched_setparam 2 | 361 | PTR sys_mlockall |
381 | sys sys_sched_getparam 2 | 362 | PTR sys_munlockall |
382 | sys sys_sched_setscheduler 3 /* 4160 */ | 363 | PTR sys_sched_setparam |
383 | sys sys_sched_getscheduler 1 | 364 | PTR sys_sched_getparam |
384 | sys sys_sched_yield 0 | 365 | PTR sys_sched_setscheduler /* 4160 */ |
385 | sys sys_sched_get_priority_max 1 | 366 | PTR sys_sched_getscheduler |
386 | sys sys_sched_get_priority_min 1 | 367 | PTR sys_sched_yield |
387 | sys sys_sched_rr_get_interval 2 /* 4165 */ | 368 | PTR sys_sched_get_priority_max |
388 | sys sys_nanosleep, 2 | 369 | PTR sys_sched_get_priority_min |
389 | sys sys_mremap, 5 | 370 | PTR sys_sched_rr_get_interval /* 4165 */ |
390 | sys sys_accept 3 | 371 | PTR sys_nanosleep |
391 | sys sys_bind 3 | 372 | PTR sys_mremap |
392 | sys sys_connect 3 /* 4170 */ | 373 | PTR sys_accept |
393 | sys sys_getpeername 3 | 374 | PTR sys_bind |
394 | sys sys_getsockname 3 | 375 | PTR sys_connect /* 4170 */ |
395 | sys sys_getsockopt 5 | 376 | PTR sys_getpeername |
396 | sys sys_listen 2 | 377 | PTR sys_getsockname |
397 | sys sys_recv 4 /* 4175 */ | 378 | PTR sys_getsockopt |
398 | sys sys_recvfrom 6 | 379 | PTR sys_listen |
399 | sys sys_recvmsg 3 | 380 | PTR sys_recv /* 4175 */ |
400 | sys sys_send 4 | 381 | PTR sys_recvfrom |
401 | sys sys_sendmsg 3 | 382 | PTR sys_recvmsg |
402 | sys sys_sendto 6 /* 4180 */ | 383 | PTR sys_send |
403 | sys sys_setsockopt 5 | 384 | PTR sys_sendmsg |
404 | sys sys_shutdown 2 | 385 | PTR sys_sendto /* 4180 */ |
405 | sys sys_socket 3 | 386 | PTR sys_setsockopt |
406 | sys sys_socketpair 4 | 387 | PTR sys_shutdown |
407 | sys sys_setresuid 3 /* 4185 */ | 388 | PTR sys_socket |
408 | sys sys_getresuid 3 | 389 | PTR sys_socketpair |
409 | sys sys_ni_syscall 0 /* was sys_query_module */ | 390 | PTR sys_setresuid /* 4185 */ |
410 | sys sys_poll 3 | 391 | PTR sys_getresuid |
411 | sys sys_ni_syscall 0 /* was nfsservctl */ | 392 | PTR sys_ni_syscall /* was sys_query_module */ |
412 | sys sys_setresgid 3 /* 4190 */ | 393 | PTR sys_poll |
413 | sys sys_getresgid 3 | 394 | PTR sys_ni_syscall /* was nfsservctl */ |
414 | sys sys_prctl 5 | 395 | PTR sys_setresgid /* 4190 */ |
415 | sys sys_rt_sigreturn 0 | 396 | PTR sys_getresgid |
416 | sys sys_rt_sigaction 4 | 397 | PTR sys_prctl |
417 | sys sys_rt_sigprocmask 4 /* 4195 */ | 398 | PTR sys_rt_sigreturn |
418 | sys sys_rt_sigpending 2 | 399 | PTR sys_rt_sigaction |
419 | sys sys_rt_sigtimedwait 4 | 400 | PTR sys_rt_sigprocmask /* 4195 */ |
420 | sys sys_rt_sigqueueinfo 3 | 401 | PTR sys_rt_sigpending |
421 | sys sys_rt_sigsuspend 0 | 402 | PTR sys_rt_sigtimedwait |
422 | sys sys_pread64 6 /* 4200 */ | 403 | PTR sys_rt_sigqueueinfo |
423 | sys sys_pwrite64 6 | 404 | PTR sys_rt_sigsuspend |
424 | sys sys_chown 3 | 405 | PTR sys_pread64 /* 4200 */ |
425 | sys sys_getcwd 2 | 406 | PTR sys_pwrite64 |
426 | sys sys_capget 2 | 407 | PTR sys_chown |
427 | sys sys_capset 2 /* 4205 */ | 408 | PTR sys_getcwd |
428 | sys sys_sigaltstack 0 | 409 | PTR sys_capget |
429 | sys sys_sendfile 4 | 410 | PTR sys_capset /* 4205 */ |
430 | sys sys_ni_syscall 0 | 411 | PTR sys_sigaltstack |
431 | sys sys_ni_syscall 0 | 412 | PTR sys_sendfile |
432 | sys sys_mips_mmap2 6 /* 4210 */ | 413 | PTR sys_ni_syscall |
433 | sys sys_truncate64 4 | 414 | PTR sys_ni_syscall |
434 | sys sys_ftruncate64 4 | 415 | PTR sys_mips_mmap2 /* 4210 */ |
435 | sys sys_stat64 2 | 416 | PTR sys_truncate64 |
436 | sys sys_lstat64 2 | 417 | PTR sys_ftruncate64 |
437 | sys sys_fstat64 2 /* 4215 */ | 418 | PTR sys_stat64 |
438 | sys sys_pivot_root 2 | 419 | PTR sys_lstat64 |
439 | sys sys_mincore 3 | 420 | PTR sys_fstat64 /* 4215 */ |
440 | sys sys_madvise 3 | 421 | PTR sys_pivot_root |
441 | sys sys_getdents64 3 | 422 | PTR sys_mincore |
442 | sys sys_fcntl64 3 /* 4220 */ | 423 | PTR sys_madvise |
443 | sys sys_ni_syscall 0 | 424 | PTR sys_getdents64 |
444 | sys sys_gettid 0 | 425 | PTR sys_fcntl64 /* 4220 */ |
445 | sys sys_readahead 5 | 426 | PTR sys_ni_syscall |
446 | sys sys_setxattr 5 | 427 | PTR sys_gettid |
447 | sys sys_lsetxattr 5 /* 4225 */ | 428 | PTR sys_readahead |
448 | sys sys_fsetxattr 5 | 429 | PTR sys_setxattr |
449 | sys sys_getxattr 4 | 430 | PTR sys_lsetxattr /* 4225 */ |
450 | sys sys_lgetxattr 4 | 431 | PTR sys_fsetxattr |
451 | sys sys_fgetxattr 4 | 432 | PTR sys_getxattr |
452 | sys sys_listxattr 3 /* 4230 */ | 433 | PTR sys_lgetxattr |
453 | sys sys_llistxattr 3 | 434 | PTR sys_fgetxattr |
454 | sys sys_flistxattr 3 | 435 | PTR sys_listxattr /* 4230 */ |
455 | sys sys_removexattr 2 | 436 | PTR sys_llistxattr |
456 | sys sys_lremovexattr 2 | 437 | PTR sys_flistxattr |
457 | sys sys_fremovexattr 2 /* 4235 */ | 438 | PTR sys_removexattr |
458 | sys sys_tkill 2 | 439 | PTR sys_lremovexattr |
459 | sys sys_sendfile64 5 | 440 | PTR sys_fremovexattr /* 4235 */ |
460 | sys sys_futex 6 | 441 | PTR sys_tkill |
442 | PTR sys_sendfile64 | ||
443 | PTR sys_futex | ||
461 | #ifdef CONFIG_MIPS_MT_FPAFF | 444 | #ifdef CONFIG_MIPS_MT_FPAFF |
462 | /* | 445 | /* |
463 | * For FPU affinity scheduling on MIPS MT processors, we need to | 446 | * For FPU affinity scheduling on MIPS MT processors, we need to |
@@ -466,132 +449,117 @@ einval: li v0, -ENOSYS | |||
466 | * these hooks for the 32-bit kernel - there is no MIPS64 MT processor | 449 | * these hooks for the 32-bit kernel - there is no MIPS64 MT processor |
467 | * atm. | 450 | * atm. |
468 | */ | 451 | */ |
469 | sys mipsmt_sys_sched_setaffinity 3 | 452 | PTR mipsmt_sys_sched_setaffinity |
470 | sys mipsmt_sys_sched_getaffinity 3 | 453 | PTR mipsmt_sys_sched_getaffinity |
471 | #else | 454 | #else |
472 | sys sys_sched_setaffinity 3 | 455 | PTR sys_sched_setaffinity |
473 | sys sys_sched_getaffinity 3 /* 4240 */ | 456 | PTR sys_sched_getaffinity /* 4240 */ |
474 | #endif /* CONFIG_MIPS_MT_FPAFF */ | 457 | #endif /* CONFIG_MIPS_MT_FPAFF */ |
475 | sys sys_io_setup 2 | 458 | PTR sys_io_setup |
476 | sys sys_io_destroy 1 | 459 | PTR sys_io_destroy |
477 | sys sys_io_getevents 5 | 460 | PTR sys_io_getevents |
478 | sys sys_io_submit 3 | 461 | PTR sys_io_submit |
479 | sys sys_io_cancel 3 /* 4245 */ | 462 | PTR sys_io_cancel /* 4245 */ |
480 | sys sys_exit_group 1 | 463 | PTR sys_exit_group |
481 | sys sys_lookup_dcookie 4 | 464 | PTR sys_lookup_dcookie |
482 | sys sys_epoll_create 1 | 465 | PTR sys_epoll_create |
483 | sys sys_epoll_ctl 4 | 466 | PTR sys_epoll_ctl |
484 | sys sys_epoll_wait 4 /* 4250 */ | 467 | PTR sys_epoll_wait /* 4250 */ |
485 | sys sys_remap_file_pages 5 | 468 | PTR sys_remap_file_pages |
486 | sys sys_set_tid_address 1 | 469 | PTR sys_set_tid_address |
487 | sys sys_restart_syscall 0 | 470 | PTR sys_restart_syscall |
488 | sys sys_fadvise64_64 7 | 471 | PTR sys_fadvise64_64 |
489 | sys sys_statfs64 3 /* 4255 */ | 472 | PTR sys_statfs64 /* 4255 */ |
490 | sys sys_fstatfs64 2 | 473 | PTR sys_fstatfs64 |
491 | sys sys_timer_create 3 | 474 | PTR sys_timer_create |
492 | sys sys_timer_settime 4 | 475 | PTR sys_timer_settime |
493 | sys sys_timer_gettime 2 | 476 | PTR sys_timer_gettime |
494 | sys sys_timer_getoverrun 1 /* 4260 */ | 477 | PTR sys_timer_getoverrun /* 4260 */ |
495 | sys sys_timer_delete 1 | 478 | PTR sys_timer_delete |
496 | sys sys_clock_settime 2 | 479 | PTR sys_clock_settime |
497 | sys sys_clock_gettime 2 | 480 | PTR sys_clock_gettime |
498 | sys sys_clock_getres 2 | 481 | PTR sys_clock_getres |
499 | sys sys_clock_nanosleep 4 /* 4265 */ | 482 | PTR sys_clock_nanosleep /* 4265 */ |
500 | sys sys_tgkill 3 | 483 | PTR sys_tgkill |
501 | sys sys_utimes 2 | 484 | PTR sys_utimes |
502 | sys sys_mbind 4 | 485 | PTR sys_mbind |
503 | sys sys_ni_syscall 0 /* sys_get_mempolicy */ | 486 | PTR sys_ni_syscall /* sys_get_mempolicy */ |
504 | sys sys_ni_syscall 0 /* 4270 sys_set_mempolicy */ | 487 | PTR sys_ni_syscall /* 4270 sys_set_mempolicy */ |
505 | sys sys_mq_open 4 | 488 | PTR sys_mq_open |
506 | sys sys_mq_unlink 1 | 489 | PTR sys_mq_unlink |
507 | sys sys_mq_timedsend 5 | 490 | PTR sys_mq_timedsend |
508 | sys sys_mq_timedreceive 5 | 491 | PTR sys_mq_timedreceive |
509 | sys sys_mq_notify 2 /* 4275 */ | 492 | PTR sys_mq_notify /* 4275 */ |
510 | sys sys_mq_getsetattr 3 | 493 | PTR sys_mq_getsetattr |
511 | sys sys_ni_syscall 0 /* sys_vserver */ | 494 | PTR sys_ni_syscall /* sys_vserver */ |
512 | sys sys_waitid 5 | 495 | PTR sys_waitid |
513 | sys sys_ni_syscall 0 /* available, was setaltroot */ | 496 | PTR sys_ni_syscall /* available, was setaltroot */ |
514 | sys sys_add_key 5 /* 4280 */ | 497 | PTR sys_add_key /* 4280 */ |
515 | sys sys_request_key 4 | 498 | PTR sys_request_key |
516 | sys sys_keyctl 5 | 499 | PTR sys_keyctl |
517 | sys sys_set_thread_area 1 | 500 | PTR sys_set_thread_area |
518 | sys sys_inotify_init 0 | 501 | PTR sys_inotify_init |
519 | sys sys_inotify_add_watch 3 /* 4285 */ | 502 | PTR sys_inotify_add_watch /* 4285 */ |
520 | sys sys_inotify_rm_watch 2 | 503 | PTR sys_inotify_rm_watch |
521 | sys sys_migrate_pages 4 | 504 | PTR sys_migrate_pages |
522 | sys sys_openat 4 | 505 | PTR sys_openat |
523 | sys sys_mkdirat 3 | 506 | PTR sys_mkdirat |
524 | sys sys_mknodat 4 /* 4290 */ | 507 | PTR sys_mknodat /* 4290 */ |
525 | sys sys_fchownat 5 | 508 | PTR sys_fchownat |
526 | sys sys_futimesat 3 | 509 | PTR sys_futimesat |
527 | sys sys_fstatat64 4 | 510 | PTR sys_fstatat64 |
528 | sys sys_unlinkat 3 | 511 | PTR sys_unlinkat |
529 | sys sys_renameat 4 /* 4295 */ | 512 | PTR sys_renameat /* 4295 */ |
530 | sys sys_linkat 5 | 513 | PTR sys_linkat |
531 | sys sys_symlinkat 3 | 514 | PTR sys_symlinkat |
532 | sys sys_readlinkat 4 | 515 | PTR sys_readlinkat |
533 | sys sys_fchmodat 3 | 516 | PTR sys_fchmodat |
534 | sys sys_faccessat 3 /* 4300 */ | 517 | PTR sys_faccessat /* 4300 */ |
535 | sys sys_pselect6 6 | 518 | PTR sys_pselect6 |
536 | sys sys_ppoll 5 | 519 | PTR sys_ppoll |
537 | sys sys_unshare 1 | 520 | PTR sys_unshare |
538 | sys sys_splice 6 | 521 | PTR sys_splice |
539 | sys sys_sync_file_range 7 /* 4305 */ | 522 | PTR sys_sync_file_range /* 4305 */ |
540 | sys sys_tee 4 | 523 | PTR sys_tee |
541 | sys sys_vmsplice 4 | 524 | PTR sys_vmsplice |
542 | sys sys_move_pages 6 | 525 | PTR sys_move_pages |
543 | sys sys_set_robust_list 2 | 526 | PTR sys_set_robust_list |
544 | sys sys_get_robust_list 3 /* 4310 */ | 527 | PTR sys_get_robust_list /* 4310 */ |
545 | sys sys_kexec_load 4 | 528 | PTR sys_kexec_load |
546 | sys sys_getcpu 3 | 529 | PTR sys_getcpu |
547 | sys sys_epoll_pwait 6 | 530 | PTR sys_epoll_pwait |
548 | sys sys_ioprio_set 3 | 531 | PTR sys_ioprio_set |
549 | sys sys_ioprio_get 2 /* 4315 */ | 532 | PTR sys_ioprio_get /* 4315 */ |
550 | sys sys_utimensat 4 | 533 | PTR sys_utimensat |
551 | sys sys_signalfd 3 | 534 | PTR sys_signalfd |
552 | sys sys_ni_syscall 0 /* was timerfd */ | 535 | PTR sys_ni_syscall /* was timerfd */ |
553 | sys sys_eventfd 1 | 536 | PTR sys_eventfd |
554 | sys sys_fallocate 6 /* 4320 */ | 537 | PTR sys_fallocate /* 4320 */ |
555 | sys sys_timerfd_create 2 | 538 | PTR sys_timerfd_create |
556 | sys sys_timerfd_gettime 2 | 539 | PTR sys_timerfd_gettime |
557 | sys sys_timerfd_settime 4 | 540 | PTR sys_timerfd_settime |
558 | sys sys_signalfd4 4 | 541 | PTR sys_signalfd4 |
559 | sys sys_eventfd2 2 /* 4325 */ | 542 | PTR sys_eventfd2 /* 4325 */ |
560 | sys sys_epoll_create1 1 | 543 | PTR sys_epoll_create1 |
561 | sys sys_dup3 3 | 544 | PTR sys_dup3 |
562 | sys sys_pipe2 2 | 545 | PTR sys_pipe2 |
563 | sys sys_inotify_init1 1 | 546 | PTR sys_inotify_init1 |
564 | sys sys_preadv 6 /* 4330 */ | 547 | PTR sys_preadv /* 4330 */ |
565 | sys sys_pwritev 6 | 548 | PTR sys_pwritev |
566 | sys sys_rt_tgsigqueueinfo 4 | 549 | PTR sys_rt_tgsigqueueinfo |
567 | sys sys_perf_event_open 5 | 550 | PTR sys_perf_event_open |
568 | sys sys_accept4 4 | 551 | PTR sys_accept4 |
569 | sys sys_recvmmsg 5 /* 4335 */ | 552 | PTR sys_recvmmsg /* 4335 */ |
570 | sys sys_fanotify_init 2 | 553 | PTR sys_fanotify_init |
571 | sys sys_fanotify_mark 6 | 554 | PTR sys_fanotify_mark |
572 | sys sys_prlimit64 4 | 555 | PTR sys_prlimit64 |
573 | sys sys_name_to_handle_at 5 | 556 | PTR sys_name_to_handle_at |
574 | sys sys_open_by_handle_at 3 /* 4340 */ | 557 | PTR sys_open_by_handle_at /* 4340 */ |
575 | sys sys_clock_adjtime 2 | 558 | PTR sys_clock_adjtime |
576 | sys sys_syncfs 1 | 559 | PTR sys_syncfs |
577 | sys sys_sendmmsg 4 | 560 | PTR sys_sendmmsg |
578 | sys sys_setns 2 | 561 | PTR sys_setns |
579 | sys sys_process_vm_readv 6 /* 4345 */ | 562 | PTR sys_process_vm_readv /* 4345 */ |
580 | sys sys_process_vm_writev 6 | 563 | PTR sys_process_vm_writev |
581 | sys sys_kcmp 5 | 564 | PTR sys_kcmp |
582 | sys sys_finit_module 3 | 565 | PTR sys_finit_module |
583 | .endm | ||
584 | |||
585 | /* We pre-compute the number of _instruction_ bytes needed to | ||
586 | load or store the arguments 6-8. Negative values are ignored. */ | ||
587 | |||
588 | .macro sys function, nargs | ||
589 | PTR \function | ||
590 | LONG (\nargs << 2) - (5 << 2) | ||
591 | .endm | ||
592 | |||
593 | .align 3 | ||
594 | .type sys_call_table,@object | ||
595 | EXPORT(sys_call_table) | ||
596 | syscalltable | ||
597 | .size sys_call_table, . - sys_call_table | ||