Linux 2.4.0-test10pre1
[davej-history.git] / arch / i386 / kernel / entry.S
blob67f1f244598be7900eb20f775f06119e76ccb7e7
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 $5,%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 $5,%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(reserved)
387         pushl $0
388         pushl $ SYMBOL_NAME(do_reserved)
389         jmp error_code
391 ENTRY(double_fault)
392         pushl $ SYMBOL_NAME(do_double_fault)
393         jmp error_code
395 ENTRY(invalid_TSS)
396         pushl $ SYMBOL_NAME(do_invalid_TSS)
397         jmp error_code
399 ENTRY(segment_not_present)
400         pushl $ SYMBOL_NAME(do_segment_not_present)
401         jmp error_code
403 ENTRY(stack_segment)
404         pushl $ SYMBOL_NAME(do_stack_segment)
405         jmp error_code
407 ENTRY(general_protection)
408         pushl $ SYMBOL_NAME(do_general_protection)
409         jmp error_code
411 ENTRY(alignment_check)
412         pushl $ SYMBOL_NAME(do_alignment_check)
413         jmp error_code
415 ENTRY(page_fault)
416         pushl $ SYMBOL_NAME(do_page_fault)
417         jmp error_code
419 ENTRY(machine_check)
420         pushl $0
421         pushl $ SYMBOL_NAME(mcheck_fault)
422         jmp error_code
424 ENTRY(spurious_interrupt_bug)
425         pushl $0
426         pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
427         jmp error_code
429 .data
430 ENTRY(sys_call_table)
431         .long SYMBOL_NAME(sys_ni_syscall)       /* 0  -  old "setup()" system call*/
432         .long SYMBOL_NAME(sys_exit)
433         .long SYMBOL_NAME(sys_fork)
434         .long SYMBOL_NAME(sys_read)
435         .long SYMBOL_NAME(sys_write)
436         .long SYMBOL_NAME(sys_open)             /* 5 */
437         .long SYMBOL_NAME(sys_close)
438         .long SYMBOL_NAME(sys_waitpid)
439         .long SYMBOL_NAME(sys_creat)
440         .long SYMBOL_NAME(sys_link)
441         .long SYMBOL_NAME(sys_unlink)           /* 10 */
442         .long SYMBOL_NAME(sys_execve)
443         .long SYMBOL_NAME(sys_chdir)
444         .long SYMBOL_NAME(sys_time)
445         .long SYMBOL_NAME(sys_mknod)
446         .long SYMBOL_NAME(sys_chmod)            /* 15 */
447         .long SYMBOL_NAME(sys_lchown16)
448         .long SYMBOL_NAME(sys_ni_syscall)                               /* old break syscall holder */
449         .long SYMBOL_NAME(sys_stat)
450         .long SYMBOL_NAME(sys_lseek)
451         .long SYMBOL_NAME(sys_getpid)           /* 20 */
452         .long SYMBOL_NAME(sys_mount)
453         .long SYMBOL_NAME(sys_oldumount)
454         .long SYMBOL_NAME(sys_setuid16)
455         .long SYMBOL_NAME(sys_getuid16)
456         .long SYMBOL_NAME(sys_stime)            /* 25 */
457         .long SYMBOL_NAME(sys_ptrace)
458         .long SYMBOL_NAME(sys_alarm)
459         .long SYMBOL_NAME(sys_fstat)
460         .long SYMBOL_NAME(sys_pause)
461         .long SYMBOL_NAME(sys_utime)            /* 30 */
462         .long SYMBOL_NAME(sys_ni_syscall)                               /* old stty syscall holder */
463         .long SYMBOL_NAME(sys_ni_syscall)                               /* old gtty syscall holder */
464         .long SYMBOL_NAME(sys_access)
465         .long SYMBOL_NAME(sys_nice)
466         .long SYMBOL_NAME(sys_ni_syscall)       /* 35 */                /* old ftime syscall holder */
467         .long SYMBOL_NAME(sys_sync)
468         .long SYMBOL_NAME(sys_kill)
469         .long SYMBOL_NAME(sys_rename)
470         .long SYMBOL_NAME(sys_mkdir)
471         .long SYMBOL_NAME(sys_rmdir)            /* 40 */
472         .long SYMBOL_NAME(sys_dup)
473         .long SYMBOL_NAME(sys_pipe)
474         .long SYMBOL_NAME(sys_times)
475         .long SYMBOL_NAME(sys_ni_syscall)                               /* old prof syscall holder */
476         .long SYMBOL_NAME(sys_brk)              /* 45 */
477         .long SYMBOL_NAME(sys_setgid16)
478         .long SYMBOL_NAME(sys_getgid16)
479         .long SYMBOL_NAME(sys_signal)
480         .long SYMBOL_NAME(sys_geteuid16)
481         .long SYMBOL_NAME(sys_getegid16)        /* 50 */
482         .long SYMBOL_NAME(sys_acct)
483         .long SYMBOL_NAME(sys_umount)                                   /* recycled never used phys() */
484         .long SYMBOL_NAME(sys_ni_syscall)                               /* old lock syscall holder */
485         .long SYMBOL_NAME(sys_ioctl)
486         .long SYMBOL_NAME(sys_fcntl)            /* 55 */
487         .long SYMBOL_NAME(sys_ni_syscall)                               /* old mpx syscall holder */
488         .long SYMBOL_NAME(sys_setpgid)
489         .long SYMBOL_NAME(sys_ni_syscall)                               /* old ulimit syscall holder */
490         .long SYMBOL_NAME(sys_olduname)
491         .long SYMBOL_NAME(sys_umask)            /* 60 */
492         .long SYMBOL_NAME(sys_chroot)
493         .long SYMBOL_NAME(sys_ustat)
494         .long SYMBOL_NAME(sys_dup2)
495         .long SYMBOL_NAME(sys_getppid)
496         .long SYMBOL_NAME(sys_getpgrp)          /* 65 */
497         .long SYMBOL_NAME(sys_setsid)
498         .long SYMBOL_NAME(sys_sigaction)
499         .long SYMBOL_NAME(sys_sgetmask)
500         .long SYMBOL_NAME(sys_ssetmask)
501         .long SYMBOL_NAME(sys_setreuid16)       /* 70 */
502         .long SYMBOL_NAME(sys_setregid16)
503         .long SYMBOL_NAME(sys_sigsuspend)
504         .long SYMBOL_NAME(sys_sigpending)
505         .long SYMBOL_NAME(sys_sethostname)
506         .long SYMBOL_NAME(sys_setrlimit)        /* 75 */
507         .long SYMBOL_NAME(sys_old_getrlimit)
508         .long SYMBOL_NAME(sys_getrusage)
509         .long SYMBOL_NAME(sys_gettimeofday)
510         .long SYMBOL_NAME(sys_settimeofday)
511         .long SYMBOL_NAME(sys_getgroups16)      /* 80 */
512         .long SYMBOL_NAME(sys_setgroups16)
513         .long SYMBOL_NAME(old_select)
514         .long SYMBOL_NAME(sys_symlink)
515         .long SYMBOL_NAME(sys_lstat)
516         .long SYMBOL_NAME(sys_readlink)         /* 85 */
517         .long SYMBOL_NAME(sys_uselib)
518         .long SYMBOL_NAME(sys_swapon)
519         .long SYMBOL_NAME(sys_reboot)
520         .long SYMBOL_NAME(old_readdir)
521         .long SYMBOL_NAME(old_mmap)             /* 90 */
522         .long SYMBOL_NAME(sys_munmap)
523         .long SYMBOL_NAME(sys_truncate)
524         .long SYMBOL_NAME(sys_ftruncate)
525         .long SYMBOL_NAME(sys_fchmod)
526         .long SYMBOL_NAME(sys_fchown16)         /* 95 */
527         .long SYMBOL_NAME(sys_getpriority)
528         .long SYMBOL_NAME(sys_setpriority)
529         .long SYMBOL_NAME(sys_ni_syscall)                               /* old profil syscall holder */
530         .long SYMBOL_NAME(sys_statfs)
531         .long SYMBOL_NAME(sys_fstatfs)          /* 100 */
532         .long SYMBOL_NAME(sys_ioperm)
533         .long SYMBOL_NAME(sys_socketcall)
534         .long SYMBOL_NAME(sys_syslog)
535         .long SYMBOL_NAME(sys_setitimer)
536         .long SYMBOL_NAME(sys_getitimer)        /* 105 */
537         .long SYMBOL_NAME(sys_newstat)
538         .long SYMBOL_NAME(sys_newlstat)
539         .long SYMBOL_NAME(sys_newfstat)
540         .long SYMBOL_NAME(sys_uname)
541         .long SYMBOL_NAME(sys_iopl)             /* 110 */
542         .long SYMBOL_NAME(sys_vhangup)
543         .long SYMBOL_NAME(sys_ni_syscall)       /* old "idle" system call */
544         .long SYMBOL_NAME(sys_vm86old)
545         .long SYMBOL_NAME(sys_wait4)
546         .long SYMBOL_NAME(sys_swapoff)          /* 115 */
547         .long SYMBOL_NAME(sys_sysinfo)
548         .long SYMBOL_NAME(sys_ipc)
549         .long SYMBOL_NAME(sys_fsync)
550         .long SYMBOL_NAME(sys_sigreturn)
551         .long SYMBOL_NAME(sys_clone)            /* 120 */
552         .long SYMBOL_NAME(sys_setdomainname)
553         .long SYMBOL_NAME(sys_newuname)
554         .long SYMBOL_NAME(sys_modify_ldt)
555         .long SYMBOL_NAME(sys_adjtimex)
556         .long SYMBOL_NAME(sys_mprotect)         /* 125 */
557         .long SYMBOL_NAME(sys_sigprocmask)
558         .long SYMBOL_NAME(sys_create_module)
559         .long SYMBOL_NAME(sys_init_module)
560         .long SYMBOL_NAME(sys_delete_module)
561         .long SYMBOL_NAME(sys_get_kernel_syms)  /* 130 */
562         .long SYMBOL_NAME(sys_quotactl)
563         .long SYMBOL_NAME(sys_getpgid)
564         .long SYMBOL_NAME(sys_fchdir)
565         .long SYMBOL_NAME(sys_bdflush)
566         .long SYMBOL_NAME(sys_sysfs)            /* 135 */
567         .long SYMBOL_NAME(sys_personality)
568         .long SYMBOL_NAME(sys_ni_syscall)       /* for afs_syscall */
569         .long SYMBOL_NAME(sys_setfsuid16)
570         .long SYMBOL_NAME(sys_setfsgid16)
571         .long SYMBOL_NAME(sys_llseek)           /* 140 */
572         .long SYMBOL_NAME(sys_getdents)
573         .long SYMBOL_NAME(sys_select)
574         .long SYMBOL_NAME(sys_flock)
575         .long SYMBOL_NAME(sys_msync)
576         .long SYMBOL_NAME(sys_readv)            /* 145 */
577         .long SYMBOL_NAME(sys_writev)
578         .long SYMBOL_NAME(sys_getsid)
579         .long SYMBOL_NAME(sys_fdatasync)
580         .long SYMBOL_NAME(sys_sysctl)
581         .long SYMBOL_NAME(sys_mlock)            /* 150 */
582         .long SYMBOL_NAME(sys_munlock)
583         .long SYMBOL_NAME(sys_mlockall)
584         .long SYMBOL_NAME(sys_munlockall)
585         .long SYMBOL_NAME(sys_sched_setparam)
586         .long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
587         .long SYMBOL_NAME(sys_sched_setscheduler)
588         .long SYMBOL_NAME(sys_sched_getscheduler)
589         .long SYMBOL_NAME(sys_sched_yield)
590         .long SYMBOL_NAME(sys_sched_get_priority_max)
591         .long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
592         .long SYMBOL_NAME(sys_sched_rr_get_interval)
593         .long SYMBOL_NAME(sys_nanosleep)
594         .long SYMBOL_NAME(sys_mremap)
595         .long SYMBOL_NAME(sys_setresuid16)
596         .long SYMBOL_NAME(sys_getresuid16)      /* 165 */
597         .long SYMBOL_NAME(sys_vm86)
598         .long SYMBOL_NAME(sys_query_module)
599         .long SYMBOL_NAME(sys_poll)
600         .long SYMBOL_NAME(sys_nfsservctl)
601         .long SYMBOL_NAME(sys_setresgid16)      /* 170 */
602         .long SYMBOL_NAME(sys_getresgid16)
603         .long SYMBOL_NAME(sys_prctl)
604         .long SYMBOL_NAME(sys_rt_sigreturn)
605         .long SYMBOL_NAME(sys_rt_sigaction)
606         .long SYMBOL_NAME(sys_rt_sigprocmask)   /* 175 */
607         .long SYMBOL_NAME(sys_rt_sigpending)
608         .long SYMBOL_NAME(sys_rt_sigtimedwait)
609         .long SYMBOL_NAME(sys_rt_sigqueueinfo)
610         .long SYMBOL_NAME(sys_rt_sigsuspend)
611         .long SYMBOL_NAME(sys_pread)            /* 180 */
612         .long SYMBOL_NAME(sys_pwrite)
613         .long SYMBOL_NAME(sys_chown16)
614         .long SYMBOL_NAME(sys_getcwd)
615         .long SYMBOL_NAME(sys_capget)
616         .long SYMBOL_NAME(sys_capset)           /* 185 */
617         .long SYMBOL_NAME(sys_sigaltstack)
618         .long SYMBOL_NAME(sys_sendfile)
619         .long SYMBOL_NAME(sys_ni_syscall)               /* streams1 */
620         .long SYMBOL_NAME(sys_ni_syscall)               /* streams2 */
621         .long SYMBOL_NAME(sys_vfork)            /* 190 */
622         .long SYMBOL_NAME(sys_getrlimit)
623         .long SYMBOL_NAME(sys_mmap2)
624         .long SYMBOL_NAME(sys_truncate64)
625         .long SYMBOL_NAME(sys_ftruncate64)
626         .long SYMBOL_NAME(sys_stat64)           /* 195 */
627         .long SYMBOL_NAME(sys_lstat64)
628         .long SYMBOL_NAME(sys_fstat64)
629         .long SYMBOL_NAME(sys_lchown)
630         .long SYMBOL_NAME(sys_getuid)
631         .long SYMBOL_NAME(sys_getgid)           /* 200 */
632         .long SYMBOL_NAME(sys_geteuid)
633         .long SYMBOL_NAME(sys_getegid)
634         .long SYMBOL_NAME(sys_setreuid)
635         .long SYMBOL_NAME(sys_setregid)
636         .long SYMBOL_NAME(sys_getgroups)        /* 205 */
637         .long SYMBOL_NAME(sys_setgroups)
638         .long SYMBOL_NAME(sys_fchown)
639         .long SYMBOL_NAME(sys_setresuid)
640         .long SYMBOL_NAME(sys_getresuid)
641         .long SYMBOL_NAME(sys_setresgid)        /* 210 */
642         .long SYMBOL_NAME(sys_getresgid)
643         .long SYMBOL_NAME(sys_chown)
644         .long SYMBOL_NAME(sys_setuid)
645         .long SYMBOL_NAME(sys_setgid)
646         .long SYMBOL_NAME(sys_setfsuid)         /* 215 */
647         .long SYMBOL_NAME(sys_setfsgid)
648         .long SYMBOL_NAME(sys_pivot_root)
649         .long SYMBOL_NAME(sys_mincore)
650         .long SYMBOL_NAME(sys_madvise)
651         .long SYMBOL_NAME(sys_getdents64)       /* 220 */
652         .long SYMBOL_NAME(sys_fcntl64)
653         .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for TUX */
655         /*
656          * NOTE!! This doesn't have to be exact - we just have
657          * to make sure we have _enough_ of the "sys_ni_syscall"
658          * entries. Don't panic if you notice that this hasn't
659          * been shrunk every time we add a new system call.
660          */
661         .rept NR_syscalls-221
662                 .long SYMBOL_NAME(sys_ni_syscall)
663         .endr