- Peter Anvin: more P4 configuration parsing
[davej-history.git] / arch / i386 / kernel / entry.S
blob5e3c910190b0e3aeb5343db3e6e1d23962b0b0fa
1 /*
2  *  linux/arch/i386/entry.S
3  *
4  *  Copyright (C) 1991, 1992  Linus Torvalds
5  */
7 /*
8  * entry.S contains the system-call and fault low-level handling routines.
9  * This also contains the timer-interrupt handler, as well as all interrupts
10  * and faults that can result in a task-switch.
11  *
12  * NOTE: This code handles signal-recognition, which happens every time
13  * after a timer-interrupt and after each system call.
14  *
15  * I changed all the .align's to 4 (16 byte alignment), as that's faster
16  * on a 486.
17  *
18  * Stack layout in 'ret_from_system_call':
19  *      ptrace needs to have all regs on the stack.
20  *      if the order here is changed, it needs to be
21  *      updated in fork.c:copy_process, signal.c:do_signal,
22  *      ptrace.c and ptrace.h
23  *
24  *       0(%esp) - %ebx
25  *       4(%esp) - %ecx
26  *       8(%esp) - %edx
27  *       C(%esp) - %esi
28  *      10(%esp) - %edi
29  *      14(%esp) - %ebp
30  *      18(%esp) - %eax
31  *      1C(%esp) - %ds
32  *      20(%esp) - %es
33  *      24(%esp) - orig_eax
34  *      28(%esp) - %eip
35  *      2C(%esp) - %cs
36  *      30(%esp) - %eflags
37  *      34(%esp) - %oldesp
38  *      38(%esp) - %oldss
39  *
40  * "current" is in register %ebx during any slow entries.
41  */
43 #include <linux/config.h>
44 #include <linux/sys.h>
45 #include <linux/linkage.h>
46 #include <asm/segment.h>
47 #define ASSEMBLY
48 #include <asm/smp.h>
50 EBX             = 0x00
51 ECX             = 0x04
52 EDX             = 0x08
53 ESI             = 0x0C
54 EDI             = 0x10
55 EBP             = 0x14
56 EAX             = 0x18
57 DS              = 0x1C
58 ES              = 0x20
59 ORIG_EAX        = 0x24
60 EIP             = 0x28
61 CS              = 0x2C
62 EFLAGS          = 0x30
63 OLDESP          = 0x34
64 OLDSS           = 0x38
66 CF_MASK         = 0x00000001
67 IF_MASK         = 0x00000200
68 NT_MASK         = 0x00004000
69 VM_MASK         = 0x00020000
72  * these are offsets into the task-struct.
73  */
74 state           =  0
75 flags           =  4
76 sigpending      =  8
77 addr_limit      = 12
78 exec_domain     = 16
79 need_resched    = 20
80 tsk_ptrace      = 24
81 processor       = 52
83 ENOSYS = 38
86 #define SAVE_ALL \
87         cld; \
88         pushl %es; \
89         pushl %ds; \
90         pushl %eax; \
91         pushl %ebp; \
92         pushl %edi; \
93         pushl %esi; \
94         pushl %edx; \
95         pushl %ecx; \
96         pushl %ebx; \
97         movl $(__KERNEL_DS),%edx; \
98         movl %edx,%ds; \
99         movl %edx,%es;
101 #define RESTORE_ALL     \
102         popl %ebx;      \
103         popl %ecx;      \
104         popl %edx;      \
105         popl %esi;      \
106         popl %edi;      \
107         popl %ebp;      \
108         popl %eax;      \
109 1:      popl %ds;       \
110 2:      popl %es;       \
111         addl $4,%esp;   \
112 3:      iret;           \
113 .section .fixup,"ax";   \
114 4:      movl $0,(%esp); \
115         jmp 1b;         \
116 5:      movl $0,(%esp); \
117         jmp 2b;         \
118 6:      pushl %ss;      \
119         popl %ds;       \
120         pushl %ss;      \
121         popl %es;       \
122         pushl $11;      \
123         call do_exit;   \
124 .previous;              \
125 .section __ex_table,"a";\
126         .align 4;       \
127         .long 1b,4b;    \
128         .long 2b,5b;    \
129         .long 3b,6b;    \
130 .previous
132 #define GET_CURRENT(reg) \
133         movl $-8192, reg; \
134         andl %esp, reg
136 ENTRY(lcall7)
137         pushfl                  # We get a different stack layout with call gates,
138         pushl %eax              # which has to be cleaned up later..
139         SAVE_ALL
140         movl EIP(%esp),%eax     # due to call gates, this is eflags, not eip..
141         movl CS(%esp),%edx      # this is eip..
142         movl EFLAGS(%esp),%ecx  # and this is cs..
143         movl %eax,EFLAGS(%esp)  #
144         movl %edx,EIP(%esp)     # Now we move them to their "normal" places
145         movl %ecx,CS(%esp)      #
146         movl %esp,%ebx
147         pushl %ebx
148         andl $-8192,%ebx        # GET_CURRENT
149         movl exec_domain(%ebx),%edx     # Get the execution domain
150         movl 4(%edx),%edx       # Get the lcall7 handler for the domain
151         pushl $0x7
152         call *%edx
153         addl $4, %esp
154         popl %eax
155         jmp ret_from_sys_call
157 ENTRY(lcall27)
158         pushfl                  # We get a different stack layout with call gates,
159         pushl %eax              # which has to be cleaned up later..
160         SAVE_ALL
161         movl EIP(%esp),%eax     # due to call gates, this is eflags, not eip..
162         movl CS(%esp),%edx      # this is eip..
163         movl EFLAGS(%esp),%ecx  # and this is cs..
164         movl %eax,EFLAGS(%esp)  #
165         movl %edx,EIP(%esp)     # Now we move them to their "normal" places
166         movl %ecx,CS(%esp)      #
167         movl %esp,%ebx
168         pushl %ebx
169         andl $-8192,%ebx        # GET_CURRENT
170         movl exec_domain(%ebx),%edx     # Get the execution domain
171         movl 4(%edx),%edx       # Get the lcall7 handler for the domain
172         pushl $0x27
173         call *%edx
174         addl $4, %esp
175         popl %eax
176         jmp ret_from_sys_call
179 ENTRY(ret_from_fork)
180         pushl %ebx
181         call SYMBOL_NAME(schedule_tail)
182         addl $4, %esp
183         GET_CURRENT(%ebx)
184         testb $0x02,tsk_ptrace(%ebx)    # PT_TRACESYS
185         jne tracesys_exit
186         jmp     ret_from_sys_call
189  * Return to user mode is not as complex as all this looks,
190  * but we want the default path for a system call return to
191  * go as quickly as possible which is why some of this is
192  * less clear than it otherwise should be.
193  */
195 ENTRY(system_call)
196         pushl %eax                      # save orig_eax
197         SAVE_ALL
198         GET_CURRENT(%ebx)
199         cmpl $(NR_syscalls),%eax
200         jae badsys
201         testb $0x02,tsk_ptrace(%ebx)    # PT_TRACESYS
202         jne tracesys
203         call *SYMBOL_NAME(sys_call_table)(,%eax,4)
204         movl %eax,EAX(%esp)             # save the return value
205 ENTRY(ret_from_sys_call)
206 #ifdef CONFIG_SMP
207         movl processor(%ebx),%eax
208         shll $CONFIG_X86_L1_CACHE_SHIFT,%eax
209         movl SYMBOL_NAME(irq_stat)(,%eax),%ecx          # softirq_active
210         testl SYMBOL_NAME(irq_stat)+4(,%eax),%ecx       # softirq_mask
211 #else
212         movl SYMBOL_NAME(irq_stat),%ecx         # softirq_active
213         testl SYMBOL_NAME(irq_stat)+4,%ecx      # softirq_mask
214 #endif
215         jne   handle_softirq
216         
217 ret_with_reschedule:
218         cmpl $0,need_resched(%ebx)
219         jne reschedule
220         cmpl $0,sigpending(%ebx)
221         jne signal_return
222 restore_all:
223         RESTORE_ALL
225         ALIGN
226 signal_return:
227         sti                             # we can get here from an interrupt handler
228         testl $(VM_MASK),EFLAGS(%esp)
229         movl %esp,%eax
230         jne v86_signal_return
231         xorl %edx,%edx
232         call SYMBOL_NAME(do_signal)
233         jmp restore_all
235         ALIGN
236 v86_signal_return:
237         call SYMBOL_NAME(save_v86_state)
238         movl %eax,%esp
239         xorl %edx,%edx
240         call SYMBOL_NAME(do_signal)
241         jmp restore_all
243         ALIGN
244 tracesys:
245         movl $-ENOSYS,EAX(%esp)
246         call SYMBOL_NAME(syscall_trace)
247         movl ORIG_EAX(%esp),%eax
248         cmpl $(NR_syscalls),%eax
249         jae tracesys_exit
250         call *SYMBOL_NAME(sys_call_table)(,%eax,4)
251         movl %eax,EAX(%esp)             # save the return value
252 tracesys_exit:
253         call SYMBOL_NAME(syscall_trace)
254         jmp ret_from_sys_call
255 badsys:
256         movl $-ENOSYS,EAX(%esp)
257         jmp ret_from_sys_call
259         ALIGN
260 ret_from_exception:
261 #ifdef CONFIG_SMP
262         GET_CURRENT(%ebx)
263         movl processor(%ebx),%eax
264         shll $CONFIG_X86_L1_CACHE_SHIFT,%eax
265         movl SYMBOL_NAME(irq_stat)(,%eax),%ecx          # softirq_active
266         testl SYMBOL_NAME(irq_stat)+4(,%eax),%ecx       # softirq_mask
267 #else
268         movl SYMBOL_NAME(irq_stat),%ecx         # softirq_active
269         testl SYMBOL_NAME(irq_stat)+4,%ecx      # softirq_mask
270 #endif
271         jne   handle_softirq
273 ENTRY(ret_from_intr)
274         GET_CURRENT(%ebx)
275         movl EFLAGS(%esp),%eax          # mix EFLAGS and CS
276         movb CS(%esp),%al
277         testl $(VM_MASK | 3),%eax       # return to VM86 mode or non-supervisor?
278         jne ret_with_reschedule
279         jmp restore_all
281         ALIGN
282 handle_softirq:
283         call SYMBOL_NAME(do_softirq)
284         jmp ret_from_intr
285         
286         ALIGN
287 reschedule:
288         call SYMBOL_NAME(schedule)    # test
289         jmp ret_from_sys_call
291 ENTRY(divide_error)
292         pushl $0                # no error code
293         pushl $ SYMBOL_NAME(do_divide_error)
294         ALIGN
295 error_code:
296         pushl %ds
297         pushl %eax
298         xorl %eax,%eax
299         pushl %ebp
300         pushl %edi
301         pushl %esi
302         pushl %edx
303         decl %eax                       # eax = -1
304         pushl %ecx
305         pushl %ebx
306         cld
307         movl %es,%ecx
308         movl ORIG_EAX(%esp), %esi       # get the error code
309         movl ES(%esp), %edi             # get the function address
310         movl %eax, ORIG_EAX(%esp)
311         movl %ecx, ES(%esp)
312         movl %esp,%edx
313         pushl %esi                      # push the error code
314         pushl %edx                      # push the pt_regs pointer
315         movl $(__KERNEL_DS),%edx
316         movl %edx,%ds
317         movl %edx,%es
318         GET_CURRENT(%ebx)
319         call *%edi
320         addl $8,%esp
321         jmp ret_from_exception
323 ENTRY(coprocessor_error)
324         pushl $0
325         pushl $ SYMBOL_NAME(do_coprocessor_error)
326         jmp error_code
328 ENTRY(simd_coprocessor_error)
329         pushl $0
330         pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
331         jmp error_code
333 ENTRY(device_not_available)
334         pushl $-1               # mark this as an int
335         SAVE_ALL
336         GET_CURRENT(%ebx)
337         pushl $ret_from_exception
338         movl %cr0,%eax
339         testl $0x4,%eax                 # EM (math emulation bit)
340         je SYMBOL_NAME(math_state_restore)
341         pushl $0                # temporary storage for ORIG_EIP
342         call  SYMBOL_NAME(math_emulate)
343         addl $4,%esp
344         ret
346 ENTRY(debug)
347         pushl $0
348         pushl $ SYMBOL_NAME(do_debug)
349         jmp error_code
351 ENTRY(nmi)
352         pushl %eax
353         SAVE_ALL
354         movl %esp,%edx
355         pushl $0
356         pushl %edx
357         call SYMBOL_NAME(do_nmi)
358         addl $8,%esp
359         RESTORE_ALL
361 ENTRY(int3)
362         pushl $0
363         pushl $ SYMBOL_NAME(do_int3)
364         jmp error_code
366 ENTRY(overflow)
367         pushl $0
368         pushl $ SYMBOL_NAME(do_overflow)
369         jmp error_code
371 ENTRY(bounds)
372         pushl $0
373         pushl $ SYMBOL_NAME(do_bounds)
374         jmp error_code
376 ENTRY(invalid_op)
377         pushl $0
378         pushl $ SYMBOL_NAME(do_invalid_op)
379         jmp error_code
381 ENTRY(coprocessor_segment_overrun)
382         pushl $0
383         pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
384         jmp error_code
386 ENTRY(double_fault)
387         pushl $ SYMBOL_NAME(do_double_fault)
388         jmp error_code
390 ENTRY(invalid_TSS)
391         pushl $ SYMBOL_NAME(do_invalid_TSS)
392         jmp error_code
394 ENTRY(segment_not_present)
395         pushl $ SYMBOL_NAME(do_segment_not_present)
396         jmp error_code
398 ENTRY(stack_segment)
399         pushl $ SYMBOL_NAME(do_stack_segment)
400         jmp error_code
402 ENTRY(general_protection)
403         pushl $ SYMBOL_NAME(do_general_protection)
404         jmp error_code
406 ENTRY(alignment_check)
407         pushl $ SYMBOL_NAME(do_alignment_check)
408         jmp error_code
410 ENTRY(page_fault)
411         pushl $ SYMBOL_NAME(do_page_fault)
412         jmp error_code
414 ENTRY(machine_check)
415         pushl $0
416         pushl $ SYMBOL_NAME(do_machine_check)
417         jmp error_code
419 ENTRY(spurious_interrupt_bug)
420         pushl $0
421         pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
422         jmp error_code
424 .data
425 ENTRY(sys_call_table)
426         .long SYMBOL_NAME(sys_ni_syscall)       /* 0  -  old "setup()" system call*/
427         .long SYMBOL_NAME(sys_exit)
428         .long SYMBOL_NAME(sys_fork)
429         .long SYMBOL_NAME(sys_read)
430         .long SYMBOL_NAME(sys_write)
431         .long SYMBOL_NAME(sys_open)             /* 5 */
432         .long SYMBOL_NAME(sys_close)
433         .long SYMBOL_NAME(sys_waitpid)
434         .long SYMBOL_NAME(sys_creat)
435         .long SYMBOL_NAME(sys_link)
436         .long SYMBOL_NAME(sys_unlink)           /* 10 */
437         .long SYMBOL_NAME(sys_execve)
438         .long SYMBOL_NAME(sys_chdir)
439         .long SYMBOL_NAME(sys_time)
440         .long SYMBOL_NAME(sys_mknod)
441         .long SYMBOL_NAME(sys_chmod)            /* 15 */
442         .long SYMBOL_NAME(sys_lchown16)
443         .long SYMBOL_NAME(sys_ni_syscall)                               /* old break syscall holder */
444         .long SYMBOL_NAME(sys_stat)
445         .long SYMBOL_NAME(sys_lseek)
446         .long SYMBOL_NAME(sys_getpid)           /* 20 */
447         .long SYMBOL_NAME(sys_mount)
448         .long SYMBOL_NAME(sys_oldumount)
449         .long SYMBOL_NAME(sys_setuid16)
450         .long SYMBOL_NAME(sys_getuid16)
451         .long SYMBOL_NAME(sys_stime)            /* 25 */
452         .long SYMBOL_NAME(sys_ptrace)
453         .long SYMBOL_NAME(sys_alarm)
454         .long SYMBOL_NAME(sys_fstat)
455         .long SYMBOL_NAME(sys_pause)
456         .long SYMBOL_NAME(sys_utime)            /* 30 */
457         .long SYMBOL_NAME(sys_ni_syscall)                               /* old stty syscall holder */
458         .long SYMBOL_NAME(sys_ni_syscall)                               /* old gtty syscall holder */
459         .long SYMBOL_NAME(sys_access)
460         .long SYMBOL_NAME(sys_nice)
461         .long SYMBOL_NAME(sys_ni_syscall)       /* 35 */                /* old ftime syscall holder */
462         .long SYMBOL_NAME(sys_sync)
463         .long SYMBOL_NAME(sys_kill)
464         .long SYMBOL_NAME(sys_rename)
465         .long SYMBOL_NAME(sys_mkdir)
466         .long SYMBOL_NAME(sys_rmdir)            /* 40 */
467         .long SYMBOL_NAME(sys_dup)
468         .long SYMBOL_NAME(sys_pipe)
469         .long SYMBOL_NAME(sys_times)
470         .long SYMBOL_NAME(sys_ni_syscall)                               /* old prof syscall holder */
471         .long SYMBOL_NAME(sys_brk)              /* 45 */
472         .long SYMBOL_NAME(sys_setgid16)
473         .long SYMBOL_NAME(sys_getgid16)
474         .long SYMBOL_NAME(sys_signal)
475         .long SYMBOL_NAME(sys_geteuid16)
476         .long SYMBOL_NAME(sys_getegid16)        /* 50 */
477         .long SYMBOL_NAME(sys_acct)
478         .long SYMBOL_NAME(sys_umount)                                   /* recycled never used phys() */
479         .long SYMBOL_NAME(sys_ni_syscall)                               /* old lock syscall holder */
480         .long SYMBOL_NAME(sys_ioctl)
481         .long SYMBOL_NAME(sys_fcntl)            /* 55 */
482         .long SYMBOL_NAME(sys_ni_syscall)                               /* old mpx syscall holder */
483         .long SYMBOL_NAME(sys_setpgid)
484         .long SYMBOL_NAME(sys_ni_syscall)                               /* old ulimit syscall holder */
485         .long SYMBOL_NAME(sys_olduname)
486         .long SYMBOL_NAME(sys_umask)            /* 60 */
487         .long SYMBOL_NAME(sys_chroot)
488         .long SYMBOL_NAME(sys_ustat)
489         .long SYMBOL_NAME(sys_dup2)
490         .long SYMBOL_NAME(sys_getppid)
491         .long SYMBOL_NAME(sys_getpgrp)          /* 65 */
492         .long SYMBOL_NAME(sys_setsid)
493         .long SYMBOL_NAME(sys_sigaction)
494         .long SYMBOL_NAME(sys_sgetmask)
495         .long SYMBOL_NAME(sys_ssetmask)
496         .long SYMBOL_NAME(sys_setreuid16)       /* 70 */
497         .long SYMBOL_NAME(sys_setregid16)
498         .long SYMBOL_NAME(sys_sigsuspend)
499         .long SYMBOL_NAME(sys_sigpending)
500         .long SYMBOL_NAME(sys_sethostname)
501         .long SYMBOL_NAME(sys_setrlimit)        /* 75 */
502         .long SYMBOL_NAME(sys_old_getrlimit)
503         .long SYMBOL_NAME(sys_getrusage)
504         .long SYMBOL_NAME(sys_gettimeofday)
505         .long SYMBOL_NAME(sys_settimeofday)
506         .long SYMBOL_NAME(sys_getgroups16)      /* 80 */
507         .long SYMBOL_NAME(sys_setgroups16)
508         .long SYMBOL_NAME(old_select)
509         .long SYMBOL_NAME(sys_symlink)
510         .long SYMBOL_NAME(sys_lstat)
511         .long SYMBOL_NAME(sys_readlink)         /* 85 */
512         .long SYMBOL_NAME(sys_uselib)
513         .long SYMBOL_NAME(sys_swapon)
514         .long SYMBOL_NAME(sys_reboot)
515         .long SYMBOL_NAME(old_readdir)
516         .long SYMBOL_NAME(old_mmap)             /* 90 */
517         .long SYMBOL_NAME(sys_munmap)
518         .long SYMBOL_NAME(sys_truncate)
519         .long SYMBOL_NAME(sys_ftruncate)
520         .long SYMBOL_NAME(sys_fchmod)
521         .long SYMBOL_NAME(sys_fchown16)         /* 95 */
522         .long SYMBOL_NAME(sys_getpriority)
523         .long SYMBOL_NAME(sys_setpriority)
524         .long SYMBOL_NAME(sys_ni_syscall)                               /* old profil syscall holder */
525         .long SYMBOL_NAME(sys_statfs)
526         .long SYMBOL_NAME(sys_fstatfs)          /* 100 */
527         .long SYMBOL_NAME(sys_ioperm)
528         .long SYMBOL_NAME(sys_socketcall)
529         .long SYMBOL_NAME(sys_syslog)
530         .long SYMBOL_NAME(sys_setitimer)
531         .long SYMBOL_NAME(sys_getitimer)        /* 105 */
532         .long SYMBOL_NAME(sys_newstat)
533         .long SYMBOL_NAME(sys_newlstat)
534         .long SYMBOL_NAME(sys_newfstat)
535         .long SYMBOL_NAME(sys_uname)
536         .long SYMBOL_NAME(sys_iopl)             /* 110 */
537         .long SYMBOL_NAME(sys_vhangup)
538         .long SYMBOL_NAME(sys_ni_syscall)       /* old "idle" system call */
539         .long SYMBOL_NAME(sys_vm86old)
540         .long SYMBOL_NAME(sys_wait4)
541         .long SYMBOL_NAME(sys_swapoff)          /* 115 */
542         .long SYMBOL_NAME(sys_sysinfo)
543         .long SYMBOL_NAME(sys_ipc)
544         .long SYMBOL_NAME(sys_fsync)
545         .long SYMBOL_NAME(sys_sigreturn)
546         .long SYMBOL_NAME(sys_clone)            /* 120 */
547         .long SYMBOL_NAME(sys_setdomainname)
548         .long SYMBOL_NAME(sys_newuname)
549         .long SYMBOL_NAME(sys_modify_ldt)
550         .long SYMBOL_NAME(sys_adjtimex)
551         .long SYMBOL_NAME(sys_mprotect)         /* 125 */
552         .long SYMBOL_NAME(sys_sigprocmask)
553         .long SYMBOL_NAME(sys_create_module)
554         .long SYMBOL_NAME(sys_init_module)
555         .long SYMBOL_NAME(sys_delete_module)
556         .long SYMBOL_NAME(sys_get_kernel_syms)  /* 130 */
557         .long SYMBOL_NAME(sys_quotactl)
558         .long SYMBOL_NAME(sys_getpgid)
559         .long SYMBOL_NAME(sys_fchdir)
560         .long SYMBOL_NAME(sys_bdflush)
561         .long SYMBOL_NAME(sys_sysfs)            /* 135 */
562         .long SYMBOL_NAME(sys_personality)
563         .long SYMBOL_NAME(sys_ni_syscall)       /* for afs_syscall */
564         .long SYMBOL_NAME(sys_setfsuid16)
565         .long SYMBOL_NAME(sys_setfsgid16)
566         .long SYMBOL_NAME(sys_llseek)           /* 140 */
567         .long SYMBOL_NAME(sys_getdents)
568         .long SYMBOL_NAME(sys_select)
569         .long SYMBOL_NAME(sys_flock)
570         .long SYMBOL_NAME(sys_msync)
571         .long SYMBOL_NAME(sys_readv)            /* 145 */
572         .long SYMBOL_NAME(sys_writev)
573         .long SYMBOL_NAME(sys_getsid)
574         .long SYMBOL_NAME(sys_fdatasync)
575         .long SYMBOL_NAME(sys_sysctl)
576         .long SYMBOL_NAME(sys_mlock)            /* 150 */
577         .long SYMBOL_NAME(sys_munlock)
578         .long SYMBOL_NAME(sys_mlockall)
579         .long SYMBOL_NAME(sys_munlockall)
580         .long SYMBOL_NAME(sys_sched_setparam)
581         .long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
582         .long SYMBOL_NAME(sys_sched_setscheduler)
583         .long SYMBOL_NAME(sys_sched_getscheduler)
584         .long SYMBOL_NAME(sys_sched_yield)
585         .long SYMBOL_NAME(sys_sched_get_priority_max)
586         .long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
587         .long SYMBOL_NAME(sys_sched_rr_get_interval)
588         .long SYMBOL_NAME(sys_nanosleep)
589         .long SYMBOL_NAME(sys_mremap)
590         .long SYMBOL_NAME(sys_setresuid16)
591         .long SYMBOL_NAME(sys_getresuid16)      /* 165 */
592         .long SYMBOL_NAME(sys_vm86)
593         .long SYMBOL_NAME(sys_query_module)
594         .long SYMBOL_NAME(sys_poll)
595         .long SYMBOL_NAME(sys_nfsservctl)
596         .long SYMBOL_NAME(sys_setresgid16)      /* 170 */
597         .long SYMBOL_NAME(sys_getresgid16)
598         .long SYMBOL_NAME(sys_prctl)
599         .long SYMBOL_NAME(sys_rt_sigreturn)
600         .long SYMBOL_NAME(sys_rt_sigaction)
601         .long SYMBOL_NAME(sys_rt_sigprocmask)   /* 175 */
602         .long SYMBOL_NAME(sys_rt_sigpending)
603         .long SYMBOL_NAME(sys_rt_sigtimedwait)
604         .long SYMBOL_NAME(sys_rt_sigqueueinfo)
605         .long SYMBOL_NAME(sys_rt_sigsuspend)
606         .long SYMBOL_NAME(sys_pread)            /* 180 */
607         .long SYMBOL_NAME(sys_pwrite)
608         .long SYMBOL_NAME(sys_chown16)
609         .long SYMBOL_NAME(sys_getcwd)
610         .long SYMBOL_NAME(sys_capget)
611         .long SYMBOL_NAME(sys_capset)           /* 185 */
612         .long SYMBOL_NAME(sys_sigaltstack)
613         .long SYMBOL_NAME(sys_sendfile)
614         .long SYMBOL_NAME(sys_ni_syscall)               /* streams1 */
615         .long SYMBOL_NAME(sys_ni_syscall)               /* streams2 */
616         .long SYMBOL_NAME(sys_vfork)            /* 190 */
617         .long SYMBOL_NAME(sys_getrlimit)
618         .long SYMBOL_NAME(sys_mmap2)
619         .long SYMBOL_NAME(sys_truncate64)
620         .long SYMBOL_NAME(sys_ftruncate64)
621         .long SYMBOL_NAME(sys_stat64)           /* 195 */
622         .long SYMBOL_NAME(sys_lstat64)
623         .long SYMBOL_NAME(sys_fstat64)
624         .long SYMBOL_NAME(sys_lchown)
625         .long SYMBOL_NAME(sys_getuid)
626         .long SYMBOL_NAME(sys_getgid)           /* 200 */
627         .long SYMBOL_NAME(sys_geteuid)
628         .long SYMBOL_NAME(sys_getegid)
629         .long SYMBOL_NAME(sys_setreuid)
630         .long SYMBOL_NAME(sys_setregid)
631         .long SYMBOL_NAME(sys_getgroups)        /* 205 */
632         .long SYMBOL_NAME(sys_setgroups)
633         .long SYMBOL_NAME(sys_fchown)
634         .long SYMBOL_NAME(sys_setresuid)
635         .long SYMBOL_NAME(sys_getresuid)
636         .long SYMBOL_NAME(sys_setresgid)        /* 210 */
637         .long SYMBOL_NAME(sys_getresgid)
638         .long SYMBOL_NAME(sys_chown)
639         .long SYMBOL_NAME(sys_setuid)
640         .long SYMBOL_NAME(sys_setgid)
641         .long SYMBOL_NAME(sys_setfsuid)         /* 215 */
642         .long SYMBOL_NAME(sys_setfsgid)
643         .long SYMBOL_NAME(sys_pivot_root)
644         .long SYMBOL_NAME(sys_mincore)
645         .long SYMBOL_NAME(sys_madvise)
646         .long SYMBOL_NAME(sys_getdents64)       /* 220 */
647         .long SYMBOL_NAME(sys_fcntl64)
648         .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for TUX */
650         /*
651          * NOTE!! This doesn't have to be exact - we just have
652          * to make sure we have _enough_ of the "sys_ni_syscall"
653          * entries. Don't panic if you notice that this hasn't
654          * been shrunk every time we add a new system call.
655          */
656         .rept NR_syscalls-221
657                 .long SYMBOL_NAME(sys_ni_syscall)
658         .endr