2005-04-17 02:20:36 +04:00
/ * - * - mode : asm - * -
*
* linux/ a r c h / m 6 8 k / k e r n e l / e n t r y . S
*
* Copyright ( C ) 1 9 9 1 , 1 9 9 2 L i n u s T o r v a l d s
*
* This f i l e i s s u b j e c t t o t h e t e r m s a n d c o n d i t i o n s o f t h e G N U G e n e r a l P u b l i c
* License. S e e t h e f i l e R E A D M E . l e g a l i n t h e m a i n d i r e c t o r y o f t h i s a r c h i v e
* for m o r e d e t a i l s .
*
* Linux/ m 6 8 k s u p p o r t b y H a m i s h M a c d o n a l d
*
* 6 8 0 6 0 fixes b y J e s p e r S k o v
*
* /
/ *
* entry. S c o n t a i n s t h e s y s t e m - c a l l a n d f a u l t l o w - l e v e l h a n d l i n g r o u t i n e s .
* This a l s o c o n t a i n s t h e t i m e r - i n t e r r u p t h a n d l e r , a s w e l l a s a l l i n t e r r u p t s
* and f a u l t s t h a t c a n r e s u l t i n a t a s k - s w i t c h .
*
* NOTE : This c o d e h a n d l e s s i g n a l - r e c o g n i t i o n , w h i c h h a p p e n s e v e r y t i m e
* after a t i m e r - i n t e r r u p t a n d a f t e r e a c h s y s t e m c a l l .
*
* /
/ *
* 1 2 / 0 3 / 9 6 Jes : Currently w e o n l y s u p p o r t m 6 8 k s i n g l e - c p u s y s t e m s , s o
* all p o i n t e r s t h a t u s e d t o b e ' c u r r e n t ' a r e n o w e n t r y
* number 0 i n t h e ' c u r r e n t _ s e t ' l i s t .
*
* 6 / 0 5 / 0 0 RZ : addedd w r i t e b a c k c o m p l e t i o n a f t e r r e t u r n f r o m s i g h a n d l e r
* for 6 8 0 4 0
* /
# include < l i n u x / l i n k a g e . h >
# include < a s m / e n t r y . h >
# include < a s m / e r r n o . h >
# include < a s m / s e t u p . h >
# include < a s m / s e g m e n t . h >
# include < a s m / t r a p s . h >
# include < a s m / u n i s t d . h >
2005-09-09 22:57:26 +04:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-17 02:20:36 +04:00
2005-11-14 03:06:59 +03:00
.globl system_ c a l l , b u s e r r , t r a p , r e s u m e
2006-06-25 16:46:58 +04:00
.globl sys_call_table
2005-04-17 02:20:36 +04:00
.globl sys_ f o r k , s y s _ c l o n e , s y s _ v f o r k
.globl ret_ f r o m _ i n t e r r u p t , b a d _ i n t e r r u p t
2006-06-25 16:47:01 +04:00
.globl auto_irqhandler_fixup
.globl user_ i r q v e c _ f i x u p , u s e r _ i r q h a n d l e r _ f i x u p
2005-04-17 02:20:36 +04:00
.text
ENTRY( b u s e r r )
SAVE_ A L L _ I N T
GET_ C U R R E N T ( % d0 )
movel % s p ,% s p @- | stack frame pointer argument
bsrl b u s e r r _ c
addql #4 ,% s p
2005-11-14 03:06:59 +03:00
jra . L r e t _ f r o m _ e x c e p t i o n
2005-04-17 02:20:36 +04:00
ENTRY( t r a p )
SAVE_ A L L _ I N T
GET_ C U R R E N T ( % d0 )
movel % s p ,% s p @- | stack frame pointer argument
bsrl t r a p _ c
addql #4 ,% s p
2005-11-14 03:06:59 +03:00
jra . L r e t _ f r o m _ e x c e p t i o n
2005-04-17 02:20:36 +04:00
| After a f o r k w e j u m p h e r e d i r e c t l y f r o m r e s u m e ,
| so t h a t % d1 c o n t a i n s t h e p r e v i o u s t a s k
| schedule_ t a i l n o w u s e d r e g a r d l e s s o f C O N F I G _ S M P
ENTRY( r e t _ f r o m _ f o r k )
movel % d1 ,% s p @-
jsr s c h e d u l e _ t a i l
addql #4 ,% s p
2005-11-14 03:06:59 +03:00
jra . L r e t _ f r o m _ e x c e p t i o n
2005-04-17 02:20:36 +04:00
2005-11-14 03:06:59 +03:00
do_trace_entry :
2005-04-17 02:20:36 +04:00
movel #- E N O S Y S , % s p @ ( P T _ D 0 ) | n e e d e d f o r s t r a c e
subql #4 ,% s p
SAVE_ S W I T C H _ S T A C K
jbsr s y s c a l l _ t r a c e
RESTORE_ S W I T C H _ S T A C K
addql #4 ,% s p
2005-11-14 03:06:59 +03:00
movel % s p @(PT_ORIG_D0),%d0
cmpl #N R _ s y s c a l l s , % d 0
jcs s y s c a l l
badsys :
movel #- E N O S Y S , % s p @ ( P T _ D 0 )
jra r e t _ f r o m _ s y s c a l l
do_trace_exit :
subql #4 ,% s p
2005-04-17 02:20:36 +04:00
SAVE_ S W I T C H _ S T A C K
jbsr s y s c a l l _ t r a c e
2005-11-14 03:06:59 +03:00
RESTORE_ S W I T C H _ S T A C K
addql #4 ,% s p
jra . L r e t _ f r o m _ e x c e p t i o n
2005-04-17 02:20:36 +04:00
2005-11-14 03:06:59 +03:00
ENTRY( r e t _ f r o m _ s i g n a l )
2005-04-17 02:20:36 +04:00
RESTORE_ S W I T C H _ S T A C K
addql #4 ,% s p
/* on 68040 complete pending writebacks if any */
# ifdef C O N F I G _ M 6 8 0 4 0
bfextu % s p @(PT_VECTOR){#0,#4},%d0
subql #7 ,% d0 | b u s e r r o r f r a m e ?
jbne 1 f
movel % s p ,% s p @-
jbsr b e r r _ 0 4 0 c l e a n u p
addql #4 ,% s p
1 :
# endif
2005-11-14 03:06:59 +03:00
jra . L r e t _ f r o m _ e x c e p t i o n
2005-04-17 02:20:36 +04:00
ENTRY( s y s t e m _ c a l l )
SAVE_ A L L _ S Y S
GET_ C U R R E N T ( % d1 )
| save t o p o f f r a m e
movel % s p ,% c u r p t r @(TASK_THREAD+THREAD_ESP0)
2005-11-14 03:06:59 +03:00
| syscall t r a c e ?
tstb % c u r p t r @(TASK_INFO+TINFO_FLAGS+2)
jmi d o _ t r a c e _ e n t r y
2005-04-17 02:20:36 +04:00
cmpl #N R _ s y s c a l l s , % d 0
jcc b a d s y s
2005-11-14 03:06:59 +03:00
syscall :
2005-04-17 02:20:36 +04:00
jbsr @(sys_call_table,%d0:l:4)@(0)
movel % d0 ,% s p @(PT_D0) | save the return value
2005-11-14 03:06:59 +03:00
ret_from_syscall :
2005-04-17 02:20:36 +04:00
| oriw #0x0700 ,% s r
2005-11-14 03:06:59 +03:00
movew % c u r p t r @(TASK_INFO+TINFO_FLAGS+2),%d0
2005-04-17 02:20:36 +04:00
jne s y s c a l l _ e x i t _ w o r k
1 : RESTORE_ A L L
syscall_exit_work :
btst #5 ,% s p @(PT_SR) | check if returning to kernel
bnes 1 b | i f s o , s k i p r e s c h e d , s i g n a l s
2005-11-14 03:06:59 +03:00
lslw #1 ,% d0
jcs d o _ t r a c e _ e x i t
jmi d o _ d e l a y e d _ t r a c e
lslw #8 ,% d0
jmi d o _ s i g n a l _ r e t u r n
2005-04-17 02:20:36 +04:00
pea r e s u m e _ u s e r s p a c e
2005-11-14 03:06:59 +03:00
jra s c h e d u l e
2005-04-17 02:20:36 +04:00
2005-11-14 03:06:59 +03:00
ENTRY( r e t _ f r o m _ e x c e p t i o n )
.Lret_from_exception :
2005-04-17 02:20:36 +04:00
btst #5 ,% s p @(PT_SR) | check if returning to kernel
bnes 1 f | i f s o , s k i p r e s c h e d , s i g n a l s
| only a l l o w i n t e r r u p t s w h e n w e a r e r e a l l y t h e l a s t o n e o n t h e
| kernel s t a c k , o t h e r w i s e s t a c k o v e r f l o w c a n o c c u r d u r i n g
| heavy i n t e r r u p t l o a d
andw #A L L O W I N T , % s r
resume_userspace :
2005-11-14 03:06:59 +03:00
moveb % c u r p t r @(TASK_INFO+TINFO_FLAGS+3),%d0
2005-04-17 02:20:36 +04:00
jne e x i t _ w o r k
1 : RESTORE_ A L L
exit_work :
| save t o p o f f r a m e
movel % s p ,% c u r p t r @(TASK_THREAD+THREAD_ESP0)
2005-11-14 03:06:59 +03:00
lslb #1 ,% d0
jmi d o _ s i g n a l _ r e t u r n
2005-04-17 02:20:36 +04:00
pea r e s u m e _ u s e r s p a c e
2005-11-14 03:06:59 +03:00
jra s c h e d u l e
2005-04-17 02:20:36 +04:00
do_signal_return :
| andw #A L L O W I N T , % s r
subql #4 ,% s p | d u m m y r e t u r n a d d r e s s
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
clrl % s p @-
bsrl d o _ s i g n a l
addql #8 ,% s p
RESTORE_ S W I T C H _ S T A C K
addql #4 ,% s p
jbra r e s u m e _ u s e r s p a c e
do_delayed_trace :
bclr #7 ,% s p @(PT_SR) | clear trace bit in SR
pea 1 | s e n d S I G T R A P
movel % c u r p t r ,% s p @-
pea L S I G T R A P
jbsr s e n d _ s i g
addql #8 ,% s p
addql #4 ,% s p
jbra r e s u m e _ u s e r s p a c e
2006-06-25 16:46:58 +04:00
/* This is the main interrupt handler for autovector interrupts */
2005-04-17 02:20:36 +04:00
2006-06-25 16:46:58 +04:00
ENTRY( a u t o _ i n t h a n d l e r )
2005-04-17 02:20:36 +04:00
SAVE_ A L L _ I N T
GET_ C U R R E N T ( % d0 )
2006-06-23 13:04:59 +04:00
addqb #1 ,% c u r p t r @(TASK_INFO+TINFO_PREEMPT+1)
2005-04-17 02:20:36 +04:00
| put e x c e p t i o n # i n d 0
2006-06-25 16:46:58 +04:00
bfextu % s p @(PT_VECTOR){#4,#10},%d0
subw #V E C _ S P U R , % d 0
2005-04-17 02:20:36 +04:00
movel % s p ,% s p @-
movel % d0 ,% s p @- | put vector # on stack
2006-06-25 16:47:01 +04:00
auto_ i r q h a n d l e r _ f i x u p = . + 2
2006-10-07 17:16:45 +04:00
jsr _ _ m 6 8 k _ h a n d l e _ i n t | p r o c e s s t h e I R Q
2006-06-25 16:47:05 +04:00
addql #8 ,% s p | p o p p a r a m e t e r s o f f s t a c k
2005-04-17 02:20:36 +04:00
ret_from_interrupt :
2006-06-23 13:04:59 +04:00
subqb #1 ,% c u r p t r @(TASK_INFO+TINFO_PREEMPT+1)
2006-06-25 16:46:58 +04:00
jeq r e t _ f r o m _ l a s t _ i n t e r r u p t
2 : RESTORE_ A L L
ALIGN
ret_from_last_interrupt :
2005-04-17 02:20:36 +04:00
moveq #( ~ A L L O W I N T > > 8 ) & 0 x f f ,% d0
andb % s p @(PT_SR),%d0
jne 2 b
/* check if we need to do software interrupts */
tstl i r q _ s t a t + C P U S T A T _ S O F T I R Q _ P E N D I N G
2005-11-14 03:06:59 +03:00
jeq . L r e t _ f r o m _ e x c e p t i o n
2005-04-17 02:20:36 +04:00
pea r e t _ f r o m _ e x c e p t i o n
jra d o _ s o f t i r q
2006-06-25 16:46:58 +04:00
/* Handler for user defined interrupt vectors */
2006-06-25 16:47:01 +04:00
ENTRY( u s e r _ i n t h a n d l e r )
2006-06-25 16:46:58 +04:00
SAVE_ A L L _ I N T
GET_ C U R R E N T ( % d0 )
addqb #1 ,% c u r p t r @(TASK_INFO+TINFO_PREEMPT+1)
| put e x c e p t i o n # i n d 0
bfextu % s p @(PT_VECTOR){#4,#10},%d0
2006-06-25 16:47:01 +04:00
user_ i r q v e c _ f i x u p = . + 2
subw #V E C _ U S E R , % d 0
2006-06-25 16:46:58 +04:00
movel % s p ,% s p @-
movel % d0 ,% s p @- | put vector # on stack
2006-06-25 16:47:01 +04:00
user_ i r q h a n d l e r _ f i x u p = . + 2
2006-10-07 17:16:45 +04:00
jsr _ _ m 6 8 k _ h a n d l e _ i n t | p r o c e s s t h e I R Q
2006-06-25 16:46:58 +04:00
addql #8 ,% s p | p o p p a r a m e t e r s o f f s t a c k
subqb #1 ,% c u r p t r @(TASK_INFO+TINFO_PREEMPT+1)
jeq r e t _ f r o m _ l a s t _ i n t e r r u p t
RESTORE_ A L L
2005-04-17 02:20:36 +04:00
/* Handler for uninitialized and spurious interrupts */
2006-06-25 16:46:58 +04:00
ENTRY( b a d _ i n t h a n d l e r )
SAVE_ A L L _ I N T
GET_ C U R R E N T ( % d0 )
addqb #1 ,% c u r p t r @(TASK_INFO+TINFO_PREEMPT+1)
movel % s p ,% s p @-
jsr h a n d l e _ b a d i n t
addql #4 ,% s p
subqb #1 ,% c u r p t r @(TASK_INFO+TINFO_PREEMPT+1)
jeq r e t _ f r o m _ l a s t _ i n t e r r u p t
RESTORE_ A L L
2005-04-17 02:20:36 +04:00
ENTRY( s y s _ f o r k )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr m 6 8 k _ f o r k
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ c l o n e )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr m 6 8 k _ c l o n e
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ v f o r k )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr m 6 8 k _ v f o r k
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ s i g s u s p e n d )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr d o _ s i g s u s p e n d
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ r t _ s i g s u s p e n d )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr d o _ r t _ s i g s u s p e n d
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ s i g r e t u r n )
SAVE_ S W I T C H _ S T A C K
jbsr d o _ s i g r e t u r n
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ r t _ s i g r e t u r n )
SAVE_ S W I T C H _ S T A C K
jbsr d o _ r t _ s i g r e t u r n
RESTORE_ S W I T C H _ S T A C K
rts
resume :
/ *
* Beware - w h e n e n t e r i n g r e s u m e , p r e v ( t h e c u r r e n t t a s k ) i s
* in a0 , n e x t ( t h e n e w t a s k ) i s i n a1 ,s o d o n ' t c h a n g e t h e s e
* registers u n t i l t h e i r c o n t e n t s a r e n o l o n g e r n e e d e d .
* /
/* save sr */
movew % s r ,% a0 @(TASK_THREAD+THREAD_SR)
/* save fs (sfc,%dfc) (may be pointing to kernel memory) */
movec % s f c ,% d0
movew % d0 ,% a0 @(TASK_THREAD+THREAD_FS)
/* save usp */
/* it is better to use a movel here instead of a movew 8*) */
movec % u s p ,% d0
movel % d0 ,% a0 @(TASK_THREAD+THREAD_USP)
/* save non-scratch registers on stack */
SAVE_ S W I T C H _ S T A C K
/* save current kernel stack pointer */
movel % s p ,% a0 @(TASK_THREAD+THREAD_KSP)
/* save floating point context */
# ifndef C O N F I G _ M 6 8 K F P U _ E M U _ O N L Y
# ifdef C O N F I G _ M 6 8 K F P U _ E M U
tstl m 6 8 k _ f p u t y p e
jeq 3 f
# endif
fsave % a0 @(TASK_THREAD+THREAD_FPSTATE)
# if d e f i n e d ( C O N F I G _ M 6 8 0 6 0 )
# if ! d e f i n e d ( C P U _ M 6 8 0 6 0 _ O N L Y )
btst #3 ,m 6 8 k _ c p u t y p e + 3
beqs 1 f
# endif
/* The 060 FPU keeps status in bits 15-8 of the first longword */
tstb % a0 @(TASK_THREAD+THREAD_FPSTATE+2)
jeq 3 f
# if ! d e f i n e d ( C P U _ M 6 8 0 6 0 _ O N L Y )
jra 2 f
# endif
# endif / * C O N F I G _ M 6 8 0 6 0 * /
# if ! d e f i n e d ( C P U _ M 6 8 0 6 0 _ O N L Y )
1 : tstb % a0 @(TASK_THREAD+THREAD_FPSTATE)
jeq 3 f
# endif
2 : fmovemx % f p0 - % f p7 ,% a0 @(TASK_THREAD+THREAD_FPREG)
fmoveml % f p c r / % f p s r / % f p i a r ,% a0 @(TASK_THREAD+THREAD_FPCNTL)
3 :
# endif / * C O N F I G _ M 6 8 K F P U _ E M U _ O N L Y * /
/* Return previous task in %d1 */
movel % c u r p t r ,% d1
/* switch to new task (a1 contains new task) */
movel % a1 ,% c u r p t r
/* restore floating point context */
# ifndef C O N F I G _ M 6 8 K F P U _ E M U _ O N L Y
# ifdef C O N F I G _ M 6 8 K F P U _ E M U
tstl m 6 8 k _ f p u t y p e
jeq 4 f
# endif
# if d e f i n e d ( C O N F I G _ M 6 8 0 6 0 )
# if ! d e f i n e d ( C P U _ M 6 8 0 6 0 _ O N L Y )
btst #3 ,m 6 8 k _ c p u t y p e + 3
beqs 1 f
# endif
/* The 060 FPU keeps status in bits 15-8 of the first longword */
tstb % a1 @(TASK_THREAD+THREAD_FPSTATE+2)
jeq 3 f
# if ! d e f i n e d ( C P U _ M 6 8 0 6 0 _ O N L Y )
jra 2 f
# endif
# endif / * C O N F I G _ M 6 8 0 6 0 * /
# if ! d e f i n e d ( C P U _ M 6 8 0 6 0 _ O N L Y )
1 : tstb % a1 @(TASK_THREAD+THREAD_FPSTATE)
jeq 3 f
# endif
2 : fmovemx % a1 @(TASK_THREAD+THREAD_FPREG),%fp0-%fp7
fmoveml % a1 @(TASK_THREAD+THREAD_FPCNTL),%fpcr/%fpsr/%fpiar
3 : frestore % a1 @(TASK_THREAD+THREAD_FPSTATE)
4 :
# endif / * C O N F I G _ M 6 8 K F P U _ E M U _ O N L Y * /
/* restore the kernel stack pointer */
movel % a1 @(TASK_THREAD+THREAD_KSP),%sp
/* restore non-scratch registers */
RESTORE_ S W I T C H _ S T A C K
/* restore user stack pointer */
movel % a1 @(TASK_THREAD+THREAD_USP),%a0
movel % a0 ,% u s p
/* restore fs (sfc,%dfc) */
movew % a1 @(TASK_THREAD+THREAD_FS),%a0
movec % a0 ,% s f c
movec % a0 ,% d f c
/* restore status register */
movew % a1 @(TASK_THREAD+THREAD_SR),%sr
rts
.data
ALIGN
sys_call_table :
.long sys_ni_syscall /* 0 - old "setup()" system call*/
.long sys_exit
.long sys_fork
.long sys_read
.long sys_write
.long sys_open /* 5 */
.long sys_close
.long sys_waitpid
.long sys_creat
.long sys_link
.long sys_unlink /* 10 */
.long sys_execve
.long sys_chdir
.long sys_time
.long sys_mknod
.long sys_chmod /* 15 */
.long sys_chown16
.long sys_ni_syscall /* old break syscall holder */
.long sys_stat
.long sys_lseek
.long sys_getpid /* 20 */
.long sys_mount
.long sys_oldumount
.long sys_setuid16
.long sys_getuid16
.long sys_stime /* 25 */
.long sys_ptrace
.long sys_alarm
.long sys_fstat
.long sys_pause
.long sys_utime /* 30 */
.long sys_ni_syscall /* old stty syscall holder */
.long sys_ni_syscall /* old gtty syscall holder */
.long sys_access
.long sys_nice
.long sys_ni_syscall /* 35 */ /* old ftime syscall holder */
.long sys_sync
.long sys_kill
.long sys_rename
.long sys_mkdir
.long sys_rmdir /* 40 */
.long sys_dup
.long sys_pipe
.long sys_times
.long sys_ni_syscall /* old prof syscall holder */
.long sys_brk /* 45 */
.long sys_setgid16
.long sys_getgid16
.long sys_signal
.long sys_geteuid16
.long sys_getegid16 /* 50 */
.long sys_acct
.long sys_umount /* recycled never used phys() */
.long sys_ni_syscall /* old lock syscall holder */
.long sys_ioctl
.long sys_fcntl /* 55 */
.long sys_ni_syscall /* old mpx syscall holder */
.long sys_setpgid
.long sys_ni_syscall /* old ulimit syscall holder */
.long sys_ni_syscall
.long sys_umask /* 60 */
.long sys_chroot
.long sys_ustat
.long sys_dup2
.long sys_getppid
.long sys_getpgrp /* 65 */
.long sys_setsid
.long sys_sigaction
.long sys_sgetmask
.long sys_ssetmask
.long sys_setreuid16 /* 70 */
.long sys_setregid16
.long sys_sigsuspend
.long sys_sigpending
.long sys_sethostname
.long sys_setrlimit /* 75 */
.long sys_old_getrlimit
.long sys_getrusage
.long sys_gettimeofday
.long sys_settimeofday
.long sys_getgroups16 /* 80 */
.long sys_setgroups16
.long old_select
.long sys_symlink
.long sys_lstat
.long sys_readlink /* 85 */
.long sys_uselib
.long sys_swapon
.long sys_reboot
.long old_readdir
.long old_mmap /* 90 */
.long sys_munmap
.long sys_truncate
.long sys_ftruncate
.long sys_fchmod
.long sys_fchown16 /* 95 */
.long sys_getpriority
.long sys_setpriority
.long sys_ni_syscall /* old profil syscall holder */
.long sys_statfs
.long sys_fstatfs /* 100 */
.long sys_ni_syscall /* ioperm for i386 */
.long sys_socketcall
.long sys_syslog
.long sys_setitimer
.long sys_getitimer /* 105 */
.long sys_newstat
.long sys_newlstat
.long sys_newfstat
.long sys_ni_syscall
.long sys_ni_syscall /* 110 */ /* iopl for i386 */
.long sys_vhangup
.long sys_ni_syscall /* obsolete idle() syscall */
.long sys_ni_syscall /* vm86old for i386 */
.long sys_wait4
.long sys_swapoff /* 115 */
.long sys_sysinfo
.long sys_ipc
.long sys_fsync
.long sys_sigreturn
.long sys_clone /* 120 */
.long sys_setdomainname
.long sys_newuname
.long sys_cacheflush /* modify_ldt for i386 */
.long sys_adjtimex
.long sys_mprotect /* 125 */
.long sys_sigprocmask
.long sys_ni_syscall /* old "create_module" */
.long sys_init_module
.long sys_delete_module
.long sys_ni_syscall /* 130 - old "get_kernel_syms" */
.long sys_quotactl
.long sys_getpgid
.long sys_fchdir
.long sys_bdflush
.long sys_sysfs /* 135 */
.long sys_personality
.long sys_ni_syscall /* for afs_syscall */
.long sys_setfsuid16
.long sys_setfsgid16
.long sys_llseek /* 140 */
.long sys_getdents
.long sys_select
.long sys_flock
.long sys_msync
.long sys_readv /* 145 */
.long sys_writev
.long sys_getsid
.long sys_fdatasync
.long sys_sysctl
.long sys_mlock /* 150 */
.long sys_munlock
.long sys_mlockall
.long sys_munlockall
.long sys_sched_setparam
.long sys_sched_getparam /* 155 */
.long sys_sched_setscheduler
.long sys_sched_getscheduler
.long sys_sched_yield
.long sys_sched_get_priority_max
.long sys_sched_get_priority_min /* 160 */
.long sys_sched_rr_get_interval
.long sys_nanosleep
.long sys_mremap
.long sys_setresuid16
.long sys_getresuid16 /* 165 */
.long sys_getpagesize
.long sys_ni_syscall /* old sys_query_module */
.long sys_poll
.long sys_nfsservctl
.long sys_setresgid16 /* 170 */
.long sys_getresgid16
.long sys_prctl
.long sys_rt_sigreturn
.long sys_rt_sigaction
.long sys_rt_sigprocmask /* 175 */
.long sys_rt_sigpending
.long sys_rt_sigtimedwait
.long sys_rt_sigqueueinfo
.long sys_rt_sigsuspend
.long sys_pread64 /* 180 */
.long sys_pwrite64
.long sys_ l c h o w n 1 6 ;
.long sys_getcwd
.long sys_capget
.long sys_capset /* 185 */
.long sys_sigaltstack
.long sys_sendfile
.long sys_ni_syscall /* streams1 */
.long sys_ni_syscall /* streams2 */
.long sys_vfork /* 190 */
.long sys_getrlimit
.long sys_mmap2
.long sys_truncate64
.long sys_ftruncate64
.long sys_stat64 /* 195 */
.long sys_lstat64
.long sys_fstat64
.long sys_chown
.long sys_getuid
.long sys_getgid /* 200 */
.long sys_geteuid
.long sys_getegid
.long sys_setreuid
.long sys_setregid
.long sys_getgroups /* 205 */
.long sys_setgroups
.long sys_fchown
.long sys_setresuid
.long sys_getresuid
.long sys_setresgid /* 210 */
.long sys_getresgid
.long sys_lchown
.long sys_setuid
.long sys_setgid
.long sys_setfsuid /* 215 */
.long sys_setfsgid
.long sys_pivot_root
.long sys_ni_syscall
.long sys_ni_syscall
.long sys_getdents64 /* 220 */
.long sys_gettid
.long sys_tkill
.long sys_setxattr
.long sys_lsetxattr
.long sys_fsetxattr /* 225 */
.long sys_getxattr
.long sys_lgetxattr
.long sys_fgetxattr
.long sys_listxattr
.long sys_llistxattr /* 230 */
.long sys_flistxattr
.long sys_removexattr
.long sys_lremovexattr
.long sys_fremovexattr
.long sys_futex /* 235 */
.long sys_sendfile64
.long sys_mincore
.long sys_madvise
.long sys_fcntl64
.long sys_readahead /* 240 */
.long sys_io_setup
.long sys_io_destroy
.long sys_io_getevents
.long sys_io_submit
.long sys_io_cancel /* 245 */
.long sys_fadvise64
.long sys_exit_group
.long sys_lookup_dcookie
.long sys_epoll_create
.long sys_epoll_ctl /* 250 */
.long sys_epoll_wait
.long sys_remap_file_pages
.long sys_set_tid_address
.long sys_timer_create
.long sys_timer_settime /* 255 */
.long sys_timer_gettime
.long sys_timer_getoverrun
.long sys_timer_delete
.long sys_clock_settime
.long sys_clock_gettime /* 260 */
.long sys_clock_getres
.long sys_clock_nanosleep
.long sys_statfs64
.long sys_fstatfs64
.long sys_tgkill /* 265 */
.long sys_utimes
.long sys_fadvise64_64
.long sys_mbind
.long sys_get_mempolicy
.long sys_set_mempolicy /* 270 */
.long sys_mq_open
.long sys_mq_unlink
.long sys_mq_timedsend
.long sys_mq_timedreceive
.long sys_mq_notify /* 275 */
.long sys_mq_getsetattr
.long sys_waitid
.long sys_ni_syscall /* for sys_vserver */
.long sys_add_key
.long sys_request_key /* 280 */
.long sys_keyctl