patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / i386 / kernel / entry.S
1 /*
2  *  linux/arch/i386/entry.S
3  *
4  *  Copyright (C) 1991, 1992  Linus Torvalds
5  */
6
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  */
42
43 #include <linux/config.h>
44 #include <linux/linkage.h>
45 #include <asm/thread_info.h>
46 #include <asm/errno.h>
47 #include <asm/segment.h>
48 #include <asm/smp.h>
49 #include <asm/page.h>
50 #include "irq_vectors.h"
51
52 #define nr_syscalls ((syscall_table_size)/4)
53
54 EBX             = 0x00
55 ECX             = 0x04
56 EDX             = 0x08
57 ESI             = 0x0C
58 EDI             = 0x10
59 EBP             = 0x14
60 EAX             = 0x18
61 DS              = 0x1C
62 ES              = 0x20
63 ORIG_EAX        = 0x24
64 EIP             = 0x28
65 CS              = 0x2C
66 EFLAGS          = 0x30
67 OLDESP          = 0x34
68 OLDSS           = 0x38
69
70 CF_MASK         = 0x00000001
71 TF_MASK         = 0x00000100
72 IF_MASK         = 0x00000200
73 DF_MASK         = 0x00000400 
74 NT_MASK         = 0x00004000
75 VM_MASK         = 0x00020000
76
77 #ifdef CONFIG_PREEMPT
78 #define preempt_stop            cli
79 #else
80 #define preempt_stop
81 #define resume_kernel           restore_all
82 #endif
83
84 #define SAVE_ALL \
85         cld; \
86         pushl %es; \
87         pushl %ds; \
88         pushl %eax; \
89         pushl %ebp; \
90         pushl %edi; \
91         pushl %esi; \
92         pushl %edx; \
93         pushl %ecx; \
94         pushl %ebx; \
95         movl $(__USER_DS), %edx; \
96         movl %edx, %ds; \
97         movl %edx, %es;
98
99 #define RESTORE_INT_REGS \
100         popl %ebx;      \
101         popl %ecx;      \
102         popl %edx;      \
103         popl %esi;      \
104         popl %edi;      \
105         popl %ebp;      \
106         popl %eax
107
108 #define RESTORE_REGS    \
109         RESTORE_INT_REGS; \
110 1:      popl %ds;       \
111 2:      popl %es;       \
112 .section .fixup,"ax";   \
113 3:      movl $0,(%esp); \
114         jmp 1b;         \
115 4:      movl $0,(%esp); \
116         jmp 2b;         \
117 .previous;              \
118 .section __ex_table,"a";\
119         .align 4;       \
120         .long 1b,3b;    \
121         .long 2b,4b;    \
122 .previous
123
124
125 #define RESTORE_ALL     \
126         RESTORE_REGS    \
127         addl $4, %esp;  \
128 1:      iret;           \
129 .section .fixup,"ax";   \
130 2:      sti;            \
131         movl $(__USER_DS), %edx; \
132         movl %edx, %ds; \
133         movl %edx, %es; \
134         pushl $11;      \
135         call do_exit;   \
136 .previous;              \
137 .section __ex_table,"a";\
138         .align 4;       \
139         .long 1b,2b;    \
140 .previous
141
142
143
144 ENTRY(lcall7)
145         pushfl                  # We get a different stack layout with call
146                                 # gates, which has to be cleaned up later..
147         pushl %eax
148         SAVE_ALL
149         movl %esp, %ebp
150         pushl %ebp
151         pushl $0x7
152 do_lcall:
153         movl EIP(%ebp), %eax    # due to call gates, this is eflags, not eip..
154         movl CS(%ebp), %edx     # this is eip..
155         movl EFLAGS(%ebp), %ecx # and this is cs..
156         movl %eax,EFLAGS(%ebp)  #
157         movl %edx,EIP(%ebp)     # Now we move them to their "normal" places
158         movl %ecx,CS(%ebp)      #
159         GET_THREAD_INFO_WITH_ESP(%ebp)  # GET_THREAD_INFO
160         movl TI_exec_domain(%ebp), %edx # Get the execution domain
161         call *EXEC_DOMAIN_handler(%edx) # Call the handler for the domain
162         addl $4, %esp
163         popl %eax
164         jmp resume_userspace
165
166 ENTRY(lcall27)
167         pushfl                  # We get a different stack layout with call
168                                 # gates, which has to be cleaned up later..
169         pushl %eax
170         SAVE_ALL
171         movl %esp, %ebp
172         pushl %ebp
173         pushl $0x27
174         jmp do_lcall
175
176
177 ENTRY(ret_from_fork)
178         pushl %eax
179         call schedule_tail
180         GET_THREAD_INFO(%ebp)
181         popl %eax
182         jmp syscall_exit
183
184 /*
185  * Return to user mode is not as complex as all this looks,
186  * but we want the default path for a system call return to
187  * go as quickly as possible which is why some of this is
188  * less clear than it otherwise should be.
189  */
190
191         # userspace resumption stub bypassing syscall exit tracing
192         ALIGN
193 ret_from_exception:
194         preempt_stop
195 ret_from_intr:
196         GET_THREAD_INFO(%ebp)
197         movl EFLAGS(%esp), %eax         # mix EFLAGS and CS
198         movb CS(%esp), %al
199         testl $(VM_MASK | 3), %eax
200         jz resume_kernel                # returning to kernel or vm86-space
201 ENTRY(resume_userspace)
202         cli                             # make sure we don't miss an interrupt
203                                         # setting need_resched or sigpending
204                                         # between sampling and the iret
205         movl TI_flags(%ebp), %ecx
206         andl $_TIF_WORK_MASK, %ecx      # is there any work to be done on
207                                         # int/exception return?
208         jne work_pending
209         jmp restore_all
210
211 #ifdef CONFIG_PREEMPT
212 ENTRY(resume_kernel)
213         cmpl $0,TI_preempt_count(%ebp)  # non-zero preempt_count ?
214         jnz restore_all
215 need_resched:
216         movl TI_flags(%ebp), %ecx       # need_resched set ?
217         testb $_TIF_NEED_RESCHED, %cl
218         jz restore_all
219         testl $IF_MASK,EFLAGS(%esp)     # interrupts off (exception path) ?
220         jz restore_all
221         movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp)
222         sti
223         call schedule
224         movl $0,TI_preempt_count(%ebp)
225         cli
226         jmp need_resched
227 #endif
228
229 /* SYSENTER_RETURN points to after the "sysenter" instruction in
230    the vsyscall page.  See vsyscall-sysentry.S, which defines the symbol.  */
231
232         # sysenter call handler stub
233 ENTRY(sysenter_entry)
234         movl TSS_sysenter_esp0(%esp),%esp
235 sysenter_past_esp:
236         sti
237         pushl $(__USER_DS)
238         pushl %ebp
239         pushfl
240         pushl $(__USER_CS)
241         pushl $SYSENTER_RETURN
242
243 /*
244  * Load the potential sixth argument from user stack.
245  * Careful about security.
246  */
247         cmpl $__PAGE_OFFSET-3,%ebp
248         jae syscall_fault
249 1:      movl (%ebp),%ebp
250 .section __ex_table,"a"
251         .align 4
252         .long 1b,syscall_fault
253 .previous
254
255         pushl %eax
256         SAVE_ALL
257         GET_THREAD_INFO(%ebp)
258         cmpl $(nr_syscalls), %eax
259         jae syscall_badsys
260
261         testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
262         jnz syscall_trace_entry
263         call *sys_call_table(,%eax,4)
264         movl %eax,EAX(%esp)
265         cli
266         movl TI_flags(%ebp), %ecx
267         testw $_TIF_ALLWORK_MASK, %cx
268         jne syscall_exit_work
269 /* if something modifies registers it must also disable sysexit */
270         movl EIP(%esp), %edx
271         movl OLDESP(%esp), %ecx
272         sti
273         sysexit
274
275
276         # system call handler stub
277 ENTRY(system_call)
278         pushl %eax                      # save orig_eax
279         SAVE_ALL
280         GET_THREAD_INFO(%ebp)
281         cmpl $(nr_syscalls), %eax
282         jae syscall_badsys
283                                         # system call tracing in operation
284         testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
285         jnz syscall_trace_entry
286 syscall_call:
287         call *sys_call_table(,%eax,4)
288         movl %eax,EAX(%esp)             # store the return value
289 syscall_exit:
290         cli                             # make sure we don't miss an interrupt
291                                         # setting need_resched or sigpending
292                                         # between sampling and the iret
293         movl TI_flags(%ebp), %ecx
294         testw $_TIF_ALLWORK_MASK, %cx   # current->work
295         jne syscall_exit_work
296 restore_all:
297         RESTORE_ALL
298
299         # perform work that needs to be done immediately before resumption
300         ALIGN
301 work_pending:
302         testb $_TIF_NEED_RESCHED, %cl
303         jz work_notifysig
304 work_resched:
305         call schedule
306         cli                             # make sure we don't miss an interrupt
307                                         # setting need_resched or sigpending
308                                         # between sampling and the iret
309         movl TI_flags(%ebp), %ecx
310         andl $_TIF_WORK_MASK, %ecx      # is there any work to be done other
311                                         # than syscall tracing?
312         jz restore_all
313         testb $_TIF_NEED_RESCHED, %cl
314         jnz work_resched
315
316 work_notifysig:                         # deal with pending signals and
317                                         # notify-resume requests
318         testl $VM_MASK, EFLAGS(%esp)
319         movl %esp, %eax
320         jne work_notifysig_v86          # returning to kernel-space or
321                                         # vm86-space
322         xorl %edx, %edx
323         call do_notify_resume
324         jmp restore_all
325
326         ALIGN
327 work_notifysig_v86:
328         pushl %ecx
329         call save_v86_state
330         popl %ecx
331         movl %eax, %esp
332         xorl %edx, %edx
333         call do_notify_resume
334         jmp restore_all
335
336         # perform syscall exit tracing
337         ALIGN
338 syscall_trace_entry:
339         movl $-ENOSYS,EAX(%esp)
340         movl %esp, %eax
341         xorl %edx,%edx
342         call do_syscall_trace
343         movl ORIG_EAX(%esp), %eax
344         cmpl $(nr_syscalls), %eax
345         jnae syscall_call
346         jmp syscall_exit
347
348         # perform syscall exit tracing
349         ALIGN
350 syscall_exit_work:
351         testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT), %cl
352         jz work_pending
353         sti                             # could let do_syscall_trace() call
354                                         # schedule() instead
355         movl %esp, %eax
356         movl $1, %edx
357         call do_syscall_trace
358         jmp resume_userspace
359
360         ALIGN
361 syscall_fault:
362         pushl %eax                      # save orig_eax
363         SAVE_ALL
364         GET_THREAD_INFO(%ebp)
365         movl $-EFAULT,EAX(%esp)
366         jmp resume_userspace
367
368         ALIGN
369 syscall_badsys:
370         movl $-ENOSYS,EAX(%esp)
371         jmp resume_userspace
372
373 /*
374  * Build the entry stubs and pointer table with
375  * some assembler magic.
376  */
377 .data
378 ENTRY(interrupt)
379 .text
380
381 vector=0
382 ENTRY(irq_entries_start)
383 .rept NR_IRQS
384         ALIGN
385 1:      pushl $vector-256
386         jmp common_interrupt
387 .data
388         .long 1b
389 .text
390 vector=vector+1
391 .endr
392
393         ALIGN
394 common_interrupt:
395         SAVE_ALL
396         call do_IRQ
397         jmp ret_from_intr
398
399 #define BUILD_INTERRUPT(name, nr)       \
400 ENTRY(name)                             \
401         pushl $nr-256;                  \
402         SAVE_ALL                        \
403         call smp_/**/name;      \
404         jmp ret_from_intr;
405
406 /* The include is where all of the SMP etc. interrupts come from */
407 #include "entry_arch.h"
408
409 ENTRY(divide_error)
410         pushl $0                        # no error code
411         pushl $do_divide_error
412         ALIGN
413 error_code:
414         pushl %ds
415         pushl %eax
416         xorl %eax, %eax
417         pushl %ebp
418         pushl %edi
419         pushl %esi
420         pushl %edx
421         decl %eax                       # eax = -1
422         pushl %ecx
423         pushl %ebx
424         cld
425         movl %es, %ecx
426         movl ORIG_EAX(%esp), %esi       # get the error code
427         movl ES(%esp), %edi             # get the function address
428         movl %eax, ORIG_EAX(%esp)
429         movl %ecx, ES(%esp)
430         movl %esp, %edx
431         pushl %esi                      # push the error code
432         pushl %edx                      # push the pt_regs pointer
433         movl $(__USER_DS), %edx
434         movl %edx, %ds
435         movl %edx, %es
436         call *%edi
437         addl $8, %esp
438         jmp ret_from_exception
439
440 ENTRY(coprocessor_error)
441         pushl $0
442         pushl $do_coprocessor_error
443         jmp error_code
444
445 ENTRY(simd_coprocessor_error)
446         pushl $0
447         pushl $do_simd_coprocessor_error
448         jmp error_code
449
450 ENTRY(device_not_available)
451         pushl $-1                       # mark this as an int
452         SAVE_ALL
453         movl %cr0, %eax
454         testl $0x4, %eax                # EM (math emulation bit)
455         jne device_not_available_emulate
456         preempt_stop
457         call math_state_restore
458         jmp ret_from_exception
459 device_not_available_emulate:
460         pushl $0                        # temporary storage for ORIG_EIP
461         call math_emulate
462         addl $4, %esp
463         jmp ret_from_exception
464
465 /*
466  * Debug traps and NMI can happen at the one SYSENTER instruction
467  * that sets up the real kernel stack. Check here, since we can't
468  * allow the wrong stack to be used.
469  *
470  * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have
471  * already pushed 3 words if it hits on the sysenter instruction:
472  * eflags, cs and eip.
473  *
474  * We just load the right stack, and push the three (known) values
475  * by hand onto the new stack - while updating the return eip past
476  * the instruction that would have done it for sysenter.
477  */
478 #define FIX_STACK(offset, ok, label)            \
479         cmpw $__KERNEL_CS,4(%esp);              \
480         jne ok;                                 \
481 label:                                          \
482         movl TSS_sysenter_esp0+offset(%esp),%esp;       \
483         pushfl;                                 \
484         pushl $__KERNEL_CS;                     \
485         pushl $sysenter_past_esp
486
487 ENTRY(debug)
488         cmpl $sysenter_entry,(%esp)
489         jne debug_stack_correct
490         FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
491 debug_stack_correct:
492         pushl $0
493         pushl $do_debug
494         jmp error_code
495
496 /*
497  * NMI is doubly nasty. It can happen _while_ we're handling
498  * a debug fault, and the debug fault hasn't yet been able to
499  * clear up the stack. So we first check whether we got  an
500  * NMI on the sysenter entry path, but after that we need to
501  * check whether we got an NMI on the debug path where the debug
502  * fault happened on the sysenter path.
503  */
504 ENTRY(nmi)
505         cmpl $sysenter_entry,(%esp)
506         je nmi_stack_fixup
507         pushl %eax
508         movl %esp,%eax
509         /* Do not access memory above the end of our stack page,
510          * it might not exist.
511          */
512         andl $(THREAD_SIZE-1),%eax
513         cmpl $(THREAD_SIZE-20),%eax
514         popl %eax
515         jae nmi_stack_correct
516         cmpl $sysenter_entry,12(%esp)
517         je nmi_debug_stack_check
518 nmi_stack_correct:
519         pushl %eax
520         SAVE_ALL
521         movl %esp, %edx
522         pushl $0
523         pushl %edx
524         call do_nmi
525         addl $8, %esp
526         RESTORE_ALL
527
528 nmi_stack_fixup:
529         FIX_STACK(12,nmi_stack_correct, 1)
530         jmp nmi_stack_correct
531 nmi_debug_stack_check:
532         cmpw $__KERNEL_CS,16(%esp)
533         jne nmi_stack_correct
534         cmpl $debug - 1,(%esp)
535         jle nmi_stack_correct
536         cmpl $debug_esp_fix_insn,(%esp)
537         jle nmi_debug_stack_fixup
538 nmi_debug_stack_fixup:
539         FIX_STACK(24,nmi_stack_correct, 1)
540         jmp nmi_stack_correct
541
542 ENTRY(int3)
543         pushl $0
544         pushl $do_int3
545         jmp error_code
546
547 ENTRY(overflow)
548         pushl $0
549         pushl $do_overflow
550         jmp error_code
551
552 ENTRY(bounds)
553         pushl $0
554         pushl $do_bounds
555         jmp error_code
556
557 ENTRY(invalid_op)
558         pushl $0
559         pushl $do_invalid_op
560         jmp error_code
561
562 ENTRY(coprocessor_segment_overrun)
563         pushl $0
564         pushl $do_coprocessor_segment_overrun
565         jmp error_code
566
567 ENTRY(invalid_TSS)
568         pushl $do_invalid_TSS
569         jmp error_code
570
571 ENTRY(segment_not_present)
572         pushl $do_segment_not_present
573         jmp error_code
574
575 ENTRY(stack_segment)
576         pushl $do_stack_segment
577         jmp error_code
578
579 ENTRY(general_protection)
580         pushl $do_general_protection
581         jmp error_code
582
583 ENTRY(alignment_check)
584         pushl $do_alignment_check
585         jmp error_code
586
587 ENTRY(page_fault)
588         pushl $do_page_fault
589         jmp error_code
590
591 #ifdef CONFIG_X86_MCE
592 ENTRY(machine_check)
593         pushl $0
594         pushl machine_check_vector
595         jmp error_code
596 #endif
597
598 ENTRY(spurious_interrupt_bug)
599         pushl $0
600         pushl $do_spurious_interrupt_bug
601         jmp error_code
602
603 .data
604 ENTRY(sys_call_table)
605         .long sys_restart_syscall       /* 0 - old "setup()" system call, used for restarting */
606         .long sys_exit
607         .long sys_fork
608         .long sys_read
609         .long sys_write
610         .long sys_open          /* 5 */
611         .long sys_close
612         .long sys_waitpid
613         .long sys_creat
614         .long sys_link
615         .long sys_unlink        /* 10 */
616         .long sys_execve
617         .long sys_chdir
618         .long sys_time
619         .long sys_mknod
620         .long sys_chmod         /* 15 */
621         .long sys_lchown16
622         .long sys_ni_syscall    /* old break syscall holder */
623         .long sys_stat
624         .long sys_lseek
625         .long sys_getpid        /* 20 */
626         .long sys_mount
627         .long sys_oldumount
628         .long sys_setuid16
629         .long sys_getuid16
630         .long sys_stime         /* 25 */
631         .long sys_ptrace
632         .long sys_alarm
633         .long sys_fstat
634         .long sys_pause
635         .long sys_utime         /* 30 */
636         .long sys_ni_syscall    /* old stty syscall holder */
637         .long sys_ni_syscall    /* old gtty syscall holder */
638         .long sys_access
639         .long sys_nice
640         .long sys_ni_syscall    /* 35 - old ftime syscall holder */
641         .long sys_sync
642         .long sys_kill
643         .long sys_rename
644         .long sys_mkdir
645         .long sys_rmdir         /* 40 */
646         .long sys_dup
647         .long sys_pipe
648         .long sys_times
649         .long sys_ni_syscall    /* old prof syscall holder */
650         .long sys_brk           /* 45 */
651         .long sys_setgid16
652         .long sys_getgid16
653         .long sys_signal
654         .long sys_geteuid16
655         .long sys_getegid16     /* 50 */
656         .long sys_acct
657         .long sys_umount        /* recycled never used phys() */
658         .long sys_ni_syscall    /* old lock syscall holder */
659         .long sys_ioctl
660         .long sys_fcntl         /* 55 */
661         .long sys_ni_syscall    /* old mpx syscall holder */
662         .long sys_setpgid
663         .long sys_ni_syscall    /* old ulimit syscall holder */
664         .long sys_olduname
665         .long sys_umask         /* 60 */
666         .long sys_chroot
667         .long sys_ustat
668         .long sys_dup2
669         .long sys_getppid
670         .long sys_getpgrp       /* 65 */
671         .long sys_setsid
672         .long sys_sigaction
673         .long sys_sgetmask
674         .long sys_ssetmask
675         .long sys_setreuid16    /* 70 */
676         .long sys_setregid16
677         .long sys_sigsuspend
678         .long sys_sigpending
679         .long sys_sethostname
680         .long sys_setrlimit     /* 75 */
681         .long sys_old_getrlimit
682         .long sys_getrusage
683         .long sys_gettimeofday
684         .long sys_settimeofday
685         .long sys_getgroups16   /* 80 */
686         .long sys_setgroups16
687         .long old_select
688         .long sys_symlink
689         .long sys_lstat
690         .long sys_readlink      /* 85 */
691         .long sys_uselib
692         .long sys_swapon
693         .long sys_reboot
694         .long old_readdir
695         .long old_mmap          /* 90 */
696         .long sys_munmap
697         .long sys_truncate
698         .long sys_ftruncate
699         .long sys_fchmod
700         .long sys_fchown16      /* 95 */
701         .long sys_getpriority
702         .long sys_setpriority
703         .long sys_ni_syscall    /* old profil syscall holder */
704         .long sys_statfs
705         .long sys_fstatfs       /* 100 */
706         .long sys_ioperm
707         .long sys_socketcall
708         .long sys_syslog
709         .long sys_setitimer
710         .long sys_getitimer     /* 105 */
711         .long sys_newstat
712         .long sys_newlstat
713         .long sys_newfstat
714         .long sys_uname
715         .long sys_iopl          /* 110 */
716         .long sys_vhangup
717         .long sys_ni_syscall    /* old "idle" system call */
718         .long sys_vm86old
719         .long sys_wait4
720         .long sys_swapoff       /* 115 */
721         .long sys_sysinfo
722         .long sys_ipc
723         .long sys_fsync
724         .long sys_sigreturn
725         .long sys_clone         /* 120 */
726         .long sys_setdomainname
727         .long sys_newuname
728         .long sys_modify_ldt
729         .long sys_adjtimex
730         .long sys_mprotect      /* 125 */
731         .long sys_sigprocmask
732         .long sys_ni_syscall    /* old "create_module" */ 
733         .long sys_init_module
734         .long sys_delete_module
735         .long sys_ni_syscall    /* 130: old "get_kernel_syms" */
736         .long sys_quotactl
737         .long sys_getpgid
738         .long sys_fchdir
739         .long sys_bdflush
740         .long sys_sysfs         /* 135 */
741         .long sys_personality
742         .long sys_ni_syscall    /* reserved for afs_syscall */
743         .long sys_setfsuid16
744         .long sys_setfsgid16
745         .long sys_llseek        /* 140 */
746         .long sys_getdents
747         .long sys_select
748         .long sys_flock
749         .long sys_msync
750         .long sys_readv         /* 145 */
751         .long sys_writev
752         .long sys_getsid
753         .long sys_fdatasync
754         .long sys_sysctl
755         .long sys_mlock         /* 150 */
756         .long sys_munlock
757         .long sys_mlockall
758         .long sys_munlockall
759         .long sys_sched_setparam
760         .long sys_sched_getparam   /* 155 */
761         .long sys_sched_setscheduler
762         .long sys_sched_getscheduler
763         .long sys_sched_yield
764         .long sys_sched_get_priority_max
765         .long sys_sched_get_priority_min  /* 160 */
766         .long sys_sched_rr_get_interval
767         .long sys_nanosleep
768         .long sys_mremap
769         .long sys_setresuid16
770         .long sys_getresuid16   /* 165 */
771         .long sys_vm86
772         .long sys_ni_syscall    /* Old sys_query_module */
773         .long sys_poll
774         .long sys_nfsservctl
775         .long sys_setresgid16   /* 170 */
776         .long sys_getresgid16
777         .long sys_prctl
778         .long sys_rt_sigreturn
779         .long sys_rt_sigaction
780         .long sys_rt_sigprocmask        /* 175 */
781         .long sys_rt_sigpending
782         .long sys_rt_sigtimedwait
783         .long sys_rt_sigqueueinfo
784         .long sys_rt_sigsuspend
785         .long sys_pread64       /* 180 */
786         .long sys_pwrite64
787         .long sys_chown16
788         .long sys_getcwd
789         .long sys_capget
790         .long sys_capset        /* 185 */
791         .long sys_sigaltstack
792         .long sys_sendfile
793         .long sys_ni_syscall    /* reserved for streams1 */
794         .long sys_ni_syscall    /* reserved for streams2 */
795         .long sys_vfork         /* 190 */
796         .long sys_getrlimit
797         .long sys_mmap2
798         .long sys_truncate64
799         .long sys_ftruncate64
800         .long sys_stat64        /* 195 */
801         .long sys_lstat64
802         .long sys_fstat64
803         .long sys_lchown
804         .long sys_getuid
805         .long sys_getgid        /* 200 */
806         .long sys_geteuid
807         .long sys_getegid
808         .long sys_setreuid
809         .long sys_setregid
810         .long sys_getgroups     /* 205 */
811         .long sys_setgroups
812         .long sys_fchown
813         .long sys_setresuid
814         .long sys_getresuid
815         .long sys_setresgid     /* 210 */
816         .long sys_getresgid
817         .long sys_chown
818         .long sys_setuid
819         .long sys_setgid
820         .long sys_setfsuid      /* 215 */
821         .long sys_setfsgid
822         .long sys_pivot_root
823         .long sys_mincore
824         .long sys_madvise
825         .long sys_getdents64    /* 220 */
826         .long sys_fcntl64
827         .long sys_ni_syscall    /* reserved for TUX */
828         .long sys_ni_syscall
829         .long sys_gettid
830         .long sys_readahead     /* 225 */
831         .long sys_setxattr
832         .long sys_lsetxattr
833         .long sys_fsetxattr
834         .long sys_getxattr
835         .long sys_lgetxattr     /* 230 */
836         .long sys_fgetxattr
837         .long sys_listxattr
838         .long sys_llistxattr
839         .long sys_flistxattr
840         .long sys_removexattr   /* 235 */
841         .long sys_lremovexattr
842         .long sys_fremovexattr
843         .long sys_tkill
844         .long sys_sendfile64
845         .long sys_futex         /* 240 */
846         .long sys_sched_setaffinity
847         .long sys_sched_getaffinity
848         .long sys_set_thread_area
849         .long sys_get_thread_area
850         .long sys_io_setup      /* 245 */
851         .long sys_io_destroy
852         .long sys_io_getevents
853         .long sys_io_submit
854         .long sys_io_cancel
855         .long sys_fadvise64     /* 250 */
856         .long sys_ni_syscall
857         .long sys_exit_group
858         .long sys_lookup_dcookie
859         .long sys_epoll_create
860         .long sys_epoll_ctl     /* 255 */
861         .long sys_epoll_wait
862         .long sys_remap_file_pages
863         .long sys_set_tid_address
864         .long sys_timer_create
865         .long sys_timer_settime         /* 260 */
866         .long sys_timer_gettime
867         .long sys_timer_getoverrun
868         .long sys_timer_delete
869         .long sys_clock_settime
870         .long sys_clock_gettime         /* 265 */
871         .long sys_clock_getres
872         .long sys_clock_nanosleep
873         .long sys_statfs64
874         .long sys_fstatfs64     
875         .long sys_tgkill        /* 270 */
876         .long sys_utimes
877         .long sys_fadvise64_64
878         .long sys_vserver
879         .long sys_mbind
880         .long sys_get_mempolicy
881         .long sys_set_mempolicy
882         .long sys_mq_open
883         .long sys_mq_unlink
884         .long sys_mq_timedsend
885         .long sys_mq_timedreceive       /* 280 */
886         .long sys_mq_notify
887         .long sys_mq_getsetattr
888         .long sys_ni_syscall            /* reserved for kexec */
889
890 syscall_table_size=(.-sys_call_table)