2005-04-17 02:20:36 +04:00
/ *
* arch/ s39 0 / k e r n e l / e n t r y . S
* S3 9 0 l o w - l e v e l e n t r y p o i n t s .
*
2006-02-01 14:06:38 +03:00
* Copyright ( C ) I B M C o r p . 1 9 9 9 ,2 0 0 6
2005-04-17 02:20:36 +04:00
* Author( s ) : M a r t i n S c h w i d e f s k y ( s c h w i d e f s k y @de.ibm.com),
2006-09-28 18:56:37 +04:00
* Hartmut P e n n e r ( h p @de.ibm.com),
* Denis J o s e p h B a r r o w ( d j b a r r o w @de.ibm.com,barrow_dj@yahoo.com),
2005-06-26 01:55:30 +04:00
* Heiko C a r s t e n s < h e i k o . c a r s t e n s @de.ibm.com>
2005-04-17 02:20:36 +04:00
* /
# include < l i n u x / l i n k a g e . h >
2008-02-05 18:50:40 +03:00
# include < l i n u x / i n i t . h >
2005-04-17 02:20:36 +04:00
# include < a s m / c a c h e . h >
# include < a s m / e r r n o . h >
# include < a s m / p t r a c e . h >
# include < a s m / t h r e a d _ i n f o . 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
# include < a s m / u n i s t d . h >
# include < a s m / p a g e . h >
/ *
* Stack l a y o u t f o r t h e s y s t e m _ c a l l s t a c k e n t r y .
* The f i r s t f e w e n t r i e s a r e i d e n t i c a l t o t h e u s e r _ r e g s _ s t r u c t .
* /
2006-09-28 18:56:37 +04:00
SP_ P T R E G S = S T A C K _ F R A M E _ O V E R H E A D
SP_ A R G S = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ A R G S
SP_ P S W = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ P S W
SP_ R 0 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S
SP_ R 1 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 4
SP_ R 2 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 8
SP_ R 3 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 1 2
SP_ R 4 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 1 6
SP_ R 5 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 2 0
SP_ R 6 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 2 4
SP_ R 7 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 2 8
SP_ R 8 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 3 2
SP_ R 9 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 3 6
SP_ R 1 0 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 4 0
SP_ R 1 1 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 4 4
SP_ R 1 2 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 4 8
SP_ R 1 3 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 5 2
SP_ R 1 4 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 5 6
SP_ R 1 5 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ G P R S + 6 0
SP_ O R I G _ R 2 = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ O R I G _ G P R 2
SP_ I L C = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ I L C
2008-11-27 13:05:55 +03:00
SP_ S V C N R = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ S V C N R
2006-09-28 18:56:37 +04:00
SP_ S I Z E = S T A C K _ F R A M E _ O V E R H E A D + _ _ P T _ S I Z E
2005-04-17 02:20:36 +04:00
2008-10-10 23:33:20 +04:00
_ TIF_ W O R K _ S V C = ( _ T I F _ S I G P E N D I N G | _ T I F _ N O T I F Y _ R E S U M E | _ T I F _ N E E D _ R E S C H E D | \
2011-01-05 14:48:10 +03:00
_ TIF_ M C C K _ P E N D I N G | _ T I F _ R E S T A R T _ S V C | _ T I F _ P E R _ T R A P )
2008-10-10 23:33:20 +04:00
_ TIF_ W O R K _ I N T = ( _ T I F _ S I G P E N D I N G | _ T I F _ N O T I F Y _ R E S U M E | _ T I F _ N E E D _ R E S C H E D | \
2006-02-01 14:06:38 +03:00
_ TIF_ M C C K _ P E N D I N G )
2009-06-12 12:26:47 +04:00
_ TIF_ S Y S C A L L = ( _ T I F _ S Y S C A L L _ T R A C E > > 8 | _ T I F _ S Y S C A L L _ A U D I T > > 8 | \
2009-08-25 01:43:11 +04:00
_ TIF_ S E C C O M P > > 8 | _ T I F _ S Y S C A L L _ T R A C E P O I N T > > 8 )
2005-04-17 02:20:36 +04:00
STACK_ S H I F T = P A G E _ S H I F T + T H R E A D _ O R D E R
STACK_ S I Z E = 1 < < S T A C K _ S H I F T
# define B A S E D ( n a m e ) n a m e - s y s t e m _ c a l l ( % r13 )
2006-07-03 11:24:46 +04:00
# ifdef C O N F I G _ T R A C E _ I R Q F L A G S
.macro TRACE_IRQS_ON
2008-11-14 20:18:05 +03:00
basr % r2 ,% r0
l % r1 ,B A S E D ( . L t r a c e _ i r q _ o n _ c a l l e r )
2006-07-03 11:24:46 +04:00
basr % r14 ,% r1
.endm
.macro TRACE_IRQS_OFF
2008-11-14 20:18:05 +03:00
basr % r2 ,% r0
l % r1 ,B A S E D ( . L t r a c e _ i r q _ o f f _ c a l l e r )
2006-07-03 11:24:46 +04:00
basr % r14 ,% r1
.endm
# else
# define T R A C E _ I R Q S _ O N
# define T R A C E _ I R Q S _ O F F
2007-11-20 13:13:32 +03:00
# endif
# ifdef C O N F I G _ L O C K D E P
.macro LOCKDEP_SYS_EXIT
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # r e t u r n i n g t o u s e r ?
jz 0 f
l % r1 ,B A S E D ( . L l o c k d e p _ s y s _ e x i t )
basr % r14 ,% r1
0 :
.endm
# else
2007-10-12 00:11:12 +04:00
# define L O C K D E P _ S Y S _ E X I T
2006-07-03 11:24:46 +04:00
# endif
2005-04-17 02:20:36 +04:00
/ *
* Register u s a g e i n i n t e r r u p t h a n d l e r s :
* R9 - p o i n t e r t o c u r r e n t t a s k s t r u c t u r e
* R1 3 - p o i n t e r t o l i t e r a l p o o l
* R1 4 - r e t u r n r e g i s t e r f o r f u n c t i o n c a l l s
* R1 5 - k e r n e l s t a c k p o i n t e r
* /
2006-09-28 18:56:37 +04:00
.macro UPDATE_VTIME lc_ f r o m ,l c _ t o ,l c _ s u m
2005-04-17 02:20:36 +04:00
lm % r10 ,% r11 ,\ l c _ f r o m
sl % r10 ,\ l c _ t o
sl % r11 ,\ l c _ t o + 4
bc 3 ,B A S E D ( 0 f )
sl % r10 ,B A S E D ( . L c _ 1 )
0 : al % r10 ,\ l c _ s u m
al % r11 ,\ l c _ s u m + 4
bc 1 2 ,B A S E D ( 1 f )
al % r10 ,B A S E D ( . L c _ 1 )
1 : stm % r10 ,% r11 ,\ l c _ s u m
.endm
2011-01-05 14:47:57 +03:00
.macro SAVE_ALL_SVC psworg,s a v e a r e a
2005-04-17 02:20:36 +04:00
stm % r12 ,% r15 ,\ s a v e a r e a
l % r13 ,_ _ L C _ S V C _ N E W _ P S W + 4 # l o a d & s y s t e m _ c a l l t o % r 13
2011-01-05 14:47:57 +03:00
l % r15 ,_ _ L C _ K E R N E L _ S T A C K # p r o b l e m s t a t e - > l o a d k s p
s % r15 ,B A S E D ( . L c _ s p s i z e ) # m a k e r o o m f o r r e g i s t e r s & p s w
2005-04-17 02:20:36 +04:00
.endm
2011-01-05 14:47:57 +03:00
.macro SAVE_ALL_BASE savearea
stm % r12 ,% r15 ,\ s a v e a r e a
l % r13 ,_ _ L C _ S V C _ N E W _ P S W + 4 # l o a d & s y s t e m _ c a l l t o % r 13
2007-07-10 13:24:18 +04:00
.endm
2011-01-05 14:47:57 +03:00
.macro SAVE_ALL_PGM psworg,s a v e a r e a
2005-04-17 02:20:36 +04:00
tm \ p s w o r g + 1 ,0 x01 # t e s t p r o b l e m s t a t e b i t
2006-06-29 16:58:05 +04:00
# ifdef C O N F I G _ C H E C K _ S T A C K
2011-01-05 14:47:57 +03:00
bnz B A S E D ( 1 f )
tml % r15 ,S T A C K _ S I Z E - C O N F I G _ S T A C K _ G U A R D
bnz B A S E D ( 2 f )
la % r12 ,\ p s w o r g
b B A S E D ( s t a c k _ o v e r f l o w )
# else
bz B A S E D ( 2 f )
2006-06-29 16:58:05 +04:00
# endif
2011-01-05 14:47:57 +03:00
1 : l % r15 ,_ _ L C _ K E R N E L _ S T A C K # p r o b l e m s t a t e - > l o a d k s p
2 : s % r15 ,B A S E D ( . L c _ s p s i z e ) # m a k e r o o m f o r r e g i s t e r s & p s w
2006-06-29 16:58:05 +04:00
.endm
.macro SAVE_ALL_ASYNC psworg,s a v e a r e a
2011-01-05 14:47:57 +03:00
stm % r12 ,% r15 ,\ s a v e a r e a
l % r13 ,_ _ L C _ S V C _ N E W _ P S W + 4 # l o a d & s y s t e m _ c a l l t o % r 13
2006-06-29 16:58:05 +04:00
la % r12 ,\ p s w o r g
2005-04-17 02:20:36 +04:00
tm \ p s w o r g + 1 ,0 x01 # t e s t p r o b l e m s t a t e b i t
bnz B A S E D ( 1 f ) # f r o m u s e r - > l o a d a s y n c s t a c k
clc \ p s w o r g + 4 ( 4 ) ,B A S E D ( . L c r i t i c a l _ e n d )
bhe B A S E D ( 0 f )
clc \ p s w o r g + 4 ( 4 ) ,B A S E D ( . L c r i t i c a l _ s t a r t )
bl B A S E D ( 0 f )
l % r14 ,B A S E D ( . L c l e a n u p _ c r i t i c a l )
basr % r14 ,% r14
2005-09-17 06:27:42 +04:00
tm 1 ( % r12 ) ,0 x01 # r e t e s t p r o b l e m s t a t e a f t e r c l e a n u p
2005-04-17 02:20:36 +04:00
bnz B A S E D ( 1 f )
0 : l % r14 ,_ _ L C _ A S Y N C _ S T A C K # a r e w e a l r e a d y o n t h e a s y n c s t a c k ?
slr % r14 ,% r15
sra % r14 ,S T A C K _ S H I F T
# ifdef C O N F I G _ C H E C K _ S T A C K
2011-01-05 14:47:57 +03:00
bnz B A S E D ( 1 f )
tml % r15 ,S T A C K _ S I Z E - C O N F I G _ S T A C K _ G U A R D
bnz B A S E D ( 2 f )
b B A S E D ( s t a c k _ o v e r f l o w )
# else
bz B A S E D ( 2 f )
2005-04-17 02:20:36 +04:00
# endif
2011-01-05 14:47:57 +03:00
1 : l % r15 ,_ _ L C _ A S Y N C _ S T A C K
2 : s % r15 ,B A S E D ( . L c _ s p s i z e ) # m a k e r o o m f o r r e g i s t e r s & p s w
2005-06-26 01:55:30 +04:00
.endm
2011-01-05 14:47:57 +03:00
.macro CREATE_STACK_FRAME savearea
xc _ _ S F _ B A C K C H A I N ( 4 ,% r15 ) ,_ _ S F _ B A C K C H A I N ( % r15 )
2005-04-17 02:20:36 +04:00
st % r2 ,S P _ O R I G _ R 2 ( % r15 ) # s t o r e o r i g i n a l c o n t e n t o f g p r 2
mvc S P _ R 1 2 ( 1 6 ,% r15 ) ,\ s a v e a r e a # m o v e % r 12 - % r15 t o s t a c k
2011-01-05 14:47:57 +03:00
stm % r0 ,% r11 ,S P _ R 0 ( % r15 ) # s t o r e g p r s % r 0 - % r11 t o k e r n e l s t a c k
2005-04-17 02:20:36 +04:00
.endm
2006-09-28 18:56:37 +04:00
.macro RESTORE_ALL psworg,s y n c
2005-09-04 02:57:56 +04:00
mvc \ p s w o r g ( 8 ) ,S P _ P S W ( % r15 ) # m o v e u s e r P S W t o l o w c o r e
2005-04-17 02:20:36 +04:00
.if ! \ sync
2005-09-04 02:57:56 +04:00
ni \ p s w o r g + 1 ,0 x f d # c l e a r w a i t s t a t e b i t
2005-04-17 02:20:36 +04:00
.endif
lm % r0 ,% r15 ,S P _ R 0 ( % r15 ) # l o a d g p r s 0 - 1 5 o f u s e r
2008-12-25 15:39:25 +03:00
stpt _ _ L C _ E X I T _ T I M E R
2005-09-04 02:57:56 +04:00
lpsw \ p s w o r g # b a c k t o c a l l e r
2005-04-17 02:20:36 +04:00
.endm
2010-10-25 18:10:37 +04:00
.macro REENABLE_IRQS
mvc _ _ S F _ E M P T Y ( 1 ,% r15 ) ,S P _ P S W ( % r15 )
ni _ _ S F _ E M P T Y ( % r15 ) ,0 x b f
ssm _ _ S F _ E M P T Y ( % r15 )
.endm
2011-01-05 14:47:25 +03:00
.section .kprobes .text , " ax"
2005-04-17 02:20:36 +04:00
/ *
* Scheduler r e s u m e f u n c t i o n , c a l l e d b y s w i t c h _ t o
* gpr2 = ( t a s k _ s t r u c t * ) p r e v
* gpr3 = ( t a s k _ s t r u c t * ) n e x t
* Returns :
* gpr2 = p r e v
* /
2006-09-28 18:56:37 +04:00
.globl __switch_to
2005-04-17 02:20:36 +04:00
__switch_to :
2006-09-28 18:56:37 +04:00
basr % r1 ,0
2011-01-05 14:48:10 +03:00
0 : l % r4 ,_ _ T H R E A D _ i n f o ( % r2 ) # g e t t h r e a d _ i n f o o f p r e v
l % r5 ,_ _ T H R E A D _ i n f o ( % r3 ) # g e t t h r e a d _ i n f o o f n e x t
2005-06-26 01:55:30 +04:00
tm _ _ T I _ f l a g s + 3 ( % r4 ) ,_ T I F _ M C C K _ P E N D I N G # m a c h i n e c h e c k p e n d i n g ?
2011-01-05 14:48:10 +03:00
bz 1 f - 0 b ( % r1 )
ni _ _ T I _ f l a g s + 3 ( % r4 ) ,2 5 5 - _ T I F _ M C C K _ P E N D I N G # c l e a r f l a g i n p r e v
oi _ _ T I _ f l a g s + 3 ( % r5 ) ,_ T I F _ M C C K _ P E N D I N G # s e t i t i n n e x t
1 : stm % r6 ,% r15 ,_ _ S F _ G P R S ( % r15 ) # s t o r e g p r s o f p r e v t a s k
st % r15 ,_ _ T H R E A D _ k s p ( % r2 ) # s t o r e k e r n e l s t a c k o f p r e v
l % r15 ,_ _ T H R E A D _ k s p ( % r3 ) # l o a d k e r n e l s t a c k o f n e x t
lctl % c4 ,% c4 ,_ _ T A S K _ p i d ( % r3 ) # l o a d p i d t o c o n t r o l r e g . 4
lm % r6 ,% r15 ,_ _ S F _ G P R S ( % r15 ) # l o a d g p r s o f n e x t t a s k
st % r3 ,_ _ L C _ C U R R E N T # s t o r e t a s k s t r u c t o f n e x t
2011-05-23 12:24:34 +04:00
mvc _ _ L C _ C U R R E N T _ P I D ( 4 ,% r0 ) ,_ _ T A S K _ p i d ( % r3 ) # s t o r e p i d o f n e x t
2011-01-05 14:48:10 +03:00
st % r5 ,_ _ L C _ T H R E A D _ I N F O # s t o r e t h r e a d i n f o o f n e x t
ahi % r5 ,S T A C K _ S I Z E # e n d o f k e r n e l s t a c k o f n e x t
st % r5 ,_ _ L C _ K E R N E L _ S T A C K # s t o r e e n d o f k e r n e l s t a c k
2005-04-17 02:20:36 +04:00
br % r14
__critical_start :
/ *
* SVC i n t e r r u p t h a n d l e r r o u t i n e . S y s t e m c a l l s a r e s y n c h r o n o u s e v e n t s a n d
* are e x e c u t e d w i t h i n t e r r u p t s e n a b l e d .
* /
2006-09-28 18:56:37 +04:00
.globl system_call
2005-04-17 02:20:36 +04:00
system_call :
2008-12-25 15:39:25 +03:00
stpt _ _ L C _ S Y N C _ E N T E R _ T I M E R
2005-04-17 02:20:36 +04:00
sysc_saveall :
2007-07-10 13:24:18 +04:00
SAVE_ A L L _ S V C _ _ L C _ S V C _ O L D _ P S W ,_ _ L C _ S A V E _ A R E A
2011-01-05 14:47:57 +03:00
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A
mvc S P _ P S W ( 8 ,% r15 ) ,_ _ L C _ S V C _ O L D _ P S W
mvc S P _ I L C ( 4 ,% r15 ) ,_ _ L C _ S V C _ I L C
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
sysc_vtime :
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
sysc_stime :
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
sysc_update :
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ S Y N C _ E N T E R _ T I M E R
sysc_do_svc :
2011-01-05 14:47:57 +03:00
xr % r7 ,% r7
icm % r7 ,3 ,S P _ S V C N R ( % r15 ) # l o a d s v c n u m b e r a n d t e s t f o r s v c 0
2006-09-28 18:56:37 +04:00
bnz B A S E D ( s y s c _ n r _ o k ) # s v c n u m b e r > 0
2005-04-17 02:20:36 +04:00
# svc 0 : system c a l l n u m b e r i n % r1
cl % r1 ,B A S E D ( . L n r _ s y s c a l l s )
bnl B A S E D ( s y s c _ n r _ o k )
2011-01-05 14:47:57 +03:00
sth % r1 ,S P _ S V C N R ( % r15 )
2006-09-28 18:56:37 +04:00
lr % r7 ,% r1 # c o p y s v c n u m b e r t o % r 7
2005-04-17 02:20:36 +04:00
sysc_nr_ok :
2008-11-27 13:05:55 +03:00
sll % r7 ,2 # s v c n u m b e r * 4
2011-01-05 14:47:57 +03:00
l % r10 ,B A S E D ( . L s y s c _ t a b l e )
tm _ _ T I _ f l a g s + 2 ( % r12 ) ,_ T I F _ S Y S C A L L
2010-10-25 18:10:40 +04:00
mvc S P _ A R G S ( 4 ,% r15 ) ,S P _ R 7 ( % r15 )
2011-01-05 14:47:57 +03:00
l % r8 ,0 ( % r7 ,% r10 ) # g e t s y s t e m c a l l a d d r .
2006-09-28 18:56:37 +04:00
bnz B A S E D ( s y s c _ t r a c e s y s )
basr % r14 ,% r8 # c a l l s y s _ x x x x
st % r2 ,S P _ R 2 ( % r15 ) # s t o r e r e t u r n v a l u e ( c h a n g e R 2 o n s t a c k )
2005-04-17 02:20:36 +04:00
sysc_return :
2010-05-17 12:00:02 +04:00
LOCKDEP_ S Y S _ E X I T
sysc_tif :
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ W O R K _ S V C
2005-04-17 02:20:36 +04:00
bnz B A S E D ( s y s c _ w o r k ) # t h e r e i s w o r k t o d o ( s i g n a l s e t c . )
2007-11-20 13:13:32 +03:00
sysc_restore :
2006-09-28 18:56:37 +04:00
RESTORE_ A L L _ _ L C _ R E T U R N _ P S W ,1
2007-11-20 13:13:32 +03:00
sysc_done :
2005-04-17 02:20:36 +04:00
#
2010-05-17 12:00:01 +04:00
# There i s w o r k t o d o , b u t f i r s t w e n e e d t o c h e c k i f w e r e t u r n t o u s e r s p a c e .
2005-04-17 02:20:36 +04:00
#
sysc_work :
2008-05-07 11:22:52 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # r e t u r n i n g t o u s e r ?
bno B A S E D ( s y s c _ r e s t o r e )
2010-05-17 12:00:01 +04:00
#
# One o f t h e w o r k b i t s i s o n . F i n d o u t w h i c h o n e .
#
2010-05-17 12:00:02 +04:00
sysc_work_tif :
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ M C C K _ P E N D I N G
2005-06-26 01:55:30 +04:00
bo B A S E D ( s y s c _ m c c k _ p e n d i n g )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ N E E D _ R E S C H E D
2005-04-17 02:20:36 +04:00
bo B A S E D ( s y s c _ r e s c h e d u l e )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ S I G P E N D I N G
2010-05-17 12:00:01 +04:00
bo B A S E D ( s y s c _ s i g p e n d i n g )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ N O T I F Y _ R E S U M E
2010-05-17 12:00:01 +04:00
bo B A S E D ( s y s c _ n o t i f y _ r e s u m e )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ R E S T A R T _ S V C
2005-04-17 02:20:36 +04:00
bo B A S E D ( s y s c _ r e s t a r t )
2011-01-05 14:48:10 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ P E R _ T R A P
2005-04-17 02:20:36 +04:00
bo B A S E D ( s y s c _ s i n g l e s t e p )
2010-05-17 12:00:01 +04:00
b B A S E D ( s y s c _ r e t u r n ) # b e w a r e o f c r i t i c a l s e c t i o n c l e a n u p
2005-04-17 02:20:36 +04:00
#
# _ TIF_ N E E D _ R E S C H E D i s s e t , c a l l s c h e d u l e
2006-09-28 18:56:37 +04:00
#
sysc_reschedule :
l % r1 ,B A S E D ( . L s c h e d u l e )
2010-05-17 12:00:02 +04:00
la % r14 ,B A S E D ( s y s c _ r e t u r n )
2006-09-28 18:56:37 +04:00
br % r1 # c a l l s c h e d u l e r
2005-04-17 02:20:36 +04:00
2005-06-26 01:55:30 +04:00
#
# _ TIF_ M C C K _ P E N D I N G i s s e t , c a l l h a n d l e r
#
sysc_mcck_pending :
l % r1 ,B A S E D ( . L s39 0 _ h a n d l e _ m c c k )
2010-05-17 12:00:02 +04:00
la % r14 ,B A S E D ( s y s c _ r e t u r n )
2005-06-26 01:55:30 +04:00
br % r1 # T I F b i t w i l l b e c l e a r e d b y h a n d l e r
2005-04-17 02:20:36 +04:00
#
2008-04-30 11:53:08 +04:00
# _ TIF_ S I G P E N D I N G i s s e t , c a l l d o _ s i g n a l
2005-04-17 02:20:36 +04:00
#
2006-09-28 18:56:37 +04:00
sysc_sigpending :
2011-01-05 14:48:10 +03:00
ni _ _ T I _ f l a g s + 3 ( % r12 ) ,2 5 5 - _ T I F _ P E R _ T R A P # c l e a r T I F _ P E R _ T R A P
2006-09-28 18:56:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
l % r1 ,B A S E D ( . L d o _ s i g n a l )
basr % r14 ,% r1 # c a l l d o _ s i g n a l
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ R E S T A R T _ S V C
2005-04-17 02:20:36 +04:00
bo B A S E D ( s y s c _ r e s t a r t )
2011-01-05 14:48:10 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ P E R _ T R A P
2005-04-17 02:20:36 +04:00
bo B A S E D ( s y s c _ s i n g l e s t e p )
2010-05-17 12:00:02 +04:00
b B A S E D ( s y s c _ r e t u r n )
2005-04-17 02:20:36 +04:00
2008-10-10 23:33:20 +04:00
#
# _ TIF_ N O T I F Y _ R E S U M E i s s e t , c a l l d o _ n o t i f y _ r e s u m e
#
sysc_notify_resume :
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
l % r1 ,B A S E D ( . L d o _ n o t i f y _ r e s u m e )
2010-05-17 12:00:02 +04:00
la % r14 ,B A S E D ( s y s c _ r e t u r n )
2008-10-10 23:33:20 +04:00
br % r1 # c a l l d o _ n o t i f y _ r e s u m e
2005-04-17 02:20:36 +04:00
#
# _ TIF_ R E S T A R T _ S V C i s s e t , s e t u p r e g i s t e r s a n d r e s t a r t s v c
#
sysc_restart :
2011-01-05 14:47:57 +03:00
ni _ _ T I _ f l a g s + 3 ( % r12 ) ,2 5 5 - _ T I F _ R E S T A R T _ S V C # c l e a r T I F _ R E S T A R T _ S V C
2006-09-28 18:56:37 +04:00
l % r7 ,S P _ R 2 ( % r15 ) # l o a d n e w s v c n u m b e r
2005-04-17 02:20:36 +04:00
mvc S P _ R 2 ( 4 ,% r15 ) ,S P _ O R I G _ R 2 ( % r15 ) # r e s t o r e f i r s t a r g u m e n t
2006-09-28 18:56:37 +04:00
lm % r2 ,% r6 ,S P _ R 2 ( % r15 ) # l o a d s v c a r g u m e n t s
2011-01-05 14:47:57 +03:00
sth % r7 ,S P _ S V C N R ( % r15 )
2010-10-25 18:10:40 +04:00
b B A S E D ( s y s c _ n r _ o k ) # r e s t a r t s v c
2005-04-17 02:20:36 +04:00
#
2011-01-05 14:48:10 +03:00
# _ TIF_ P E R _ T R A P i s s e t , c a l l d o _ p e r _ t r a p
2005-04-17 02:20:36 +04:00
#
sysc_singlestep :
2011-01-05 14:48:10 +03:00
ni _ _ T I _ f l a g s + 3 ( % r12 ) ,2 5 5 - _ T I F _ P E R _ T R A P # c l e a r T I F _ P E R _ T R A P
2011-01-05 14:47:57 +03:00
xc S P _ S V C N R ( 2 ,% r15 ) ,S P _ S V C N R ( % r15 ) # c l e a r s v c n u m b e r
2005-04-17 02:20:36 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # a d d r e s s o f r e g i s t e r - s a v e a r e a
l % r1 ,B A S E D ( . L h a n d l e _ p e r ) # l o a d a d r . o f p e r h a n d l e r
2010-05-17 12:00:02 +04:00
la % r14 ,B A S E D ( s y s c _ r e t u r n ) # l o a d a d r . o f s y s t e m r e t u r n
2011-01-05 14:48:10 +03:00
br % r1 # b r a n c h t o d o _ p e r _ t r a p
2005-04-17 02:20:36 +04:00
#
2008-10-10 23:33:20 +04:00
# call t r a c e h o o k _ r e p o r t _ s y s c a l l _ e n t r y / t r a c e h o o k _ r e p o r t _ s y s c a l l _ e x i t b e f o r e
# and a f t e r t h e s y s t e m c a l l
2005-04-17 02:20:36 +04:00
#
sysc_tracesys :
2008-10-10 23:33:20 +04:00
l % r1 ,B A S E D ( . L t r a c e _ e n t r y )
2006-09-28 18:56:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
2005-04-17 02:20:36 +04:00
la % r3 ,0
2011-01-05 14:47:57 +03:00
xr % r0 ,% r0
icm % r0 ,3 ,S P _ S V C N R ( % r15 )
st % r0 ,S P _ R 2 ( % r15 )
2005-04-17 02:20:36 +04:00
basr % r14 ,% r1
2008-10-10 23:33:20 +04:00
cl % r2 ,B A S E D ( . L n r _ s y s c a l l s )
2005-04-17 02:20:36 +04:00
bnl B A S E D ( s y s c _ t r a c e n o g o )
2008-10-10 23:33:20 +04:00
lr % r7 ,% r2
2008-11-27 13:05:55 +03:00
sll % r7 ,2 # s v c n u m b e r * 4
2011-01-05 14:47:57 +03:00
l % r8 ,0 ( % r7 ,% r10 )
2005-04-17 02:20:36 +04:00
sysc_tracego :
lm % r3 ,% r6 ,S P _ R 3 ( % r15 )
2010-10-25 18:10:40 +04:00
mvc S P _ A R G S ( 4 ,% r15 ) ,S P _ R 7 ( % r15 )
2005-04-17 02:20:36 +04:00
l % r2 ,S P _ O R I G _ R 2 ( % r15 )
2006-09-28 18:56:37 +04:00
basr % r14 ,% r8 # c a l l s y s _ x x x
st % r2 ,S P _ R 2 ( % r15 ) # s t o r e r e t u r n v a l u e
2005-04-17 02:20:36 +04:00
sysc_tracenogo :
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 2 ( % r12 ) ,_ T I F _ S Y S C A L L
2006-09-28 18:56:37 +04:00
bz B A S E D ( s y s c _ r e t u r n )
2008-10-10 23:33:20 +04:00
l % r1 ,B A S E D ( . L t r a c e _ e x i t )
2006-09-28 18:56:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
2005-04-17 02:20:36 +04:00
la % r14 ,B A S E D ( s y s c _ r e t u r n )
br % r1
#
# a n e w p r o c e s s e x i t s t h e k e r n e l w i t h r e t _ f r o m _ f o r k
#
2006-09-28 18:56:37 +04:00
.globl ret_from_fork
2005-04-17 02:20:36 +04:00
ret_from_fork :
l % r13 ,_ _ L C _ S V C _ N E W _ P S W + 4
2011-01-05 14:47:57 +03:00
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # f o r k i n g a k e r n e l t h r e a d ?
bo B A S E D ( 0 f )
st % r15 ,S P _ R 1 5 ( % r15 ) # s t o r e s t a c k p o i n t e r f o r n e w k t h r e a d
2006-09-28 18:56:37 +04:00
0 : l % r1 ,B A S E D ( . L s c h e d t a i l )
basr % r14 ,% r1
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O N
2006-09-28 18:56:37 +04:00
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x03 # r e e n a b l e i n t e r r u p t s
[S390] audit: get s390 ret_from_fork in sync with other architectures
On s390 we have ret_from_fork jump not to the "do all work we
normally do on return from syscall" as on x86, ppc, etc., but to the
"do all such work except audit". Historical reasons - the codepath
triggered when we have AUDIT process flag set is separated from the
normall one and they converge at sysc_return, which is the common
part of post-syscall work. And does not include calling audit_syscall_exit() -
that's done in the end of sysc_tracesys path, just before that path jumps
to sysc_return.
IOW, the child returning from fork()/clone()/vfork() doesn't
call audit_syscall_exit() at all, so no matter what we do with its
audit context, we are not going to see the audit entry.
The fix is simple: have ret_from_fork go to the point just past
the call of sys_.... in the 'we have AUDIT flag set' path. There we
have (64bit variant; for 31bit the situation is the same):
sysc_tracenogo:
tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
jz sysc_return
la %r2,SP_PTREGS(%r15) # load pt_regs
larl %r14,sysc_return # return point is sysc_return
jg do_syscall_trace_exit
which is precisely what we need - check the flag, bugger off to sysc_return
if not set, otherwise call do_syscall_trace_exit() and bugger off to
sysc_return. r9 has just been properly set by ret_from_fork itself,
so we are fine.
Tested on s390x, seems to work fine. WARNING: it's been about
16 years since my last contact with 3X0 assembler[1], so additional
review would be very welcome. I don't think I've managed to screw it
up, but...
[1] that *was* in another country and besides, the box is dead...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 15:37:58 +03:00
b B A S E D ( s y s c _ t r a c e n o g o )
2005-04-17 02:20:36 +04:00
#
2007-04-27 18:01:40 +04:00
# kernel_ e x e c v e f u n c t i o n n e e d s t o d e a l w i t h p t _ r e g s t h a t i s n o t
# at t h e u s u a l p l a c e
2005-04-17 02:20:36 +04:00
#
2007-04-27 18:01:40 +04:00
.globl kernel_execve
kernel_execve :
stm % r12 ,% r15 ,4 8 ( % r15 )
lr % r14 ,% r15
l % r13 ,_ _ L C _ S V C _ N E W _ P S W + 4
s % r15 ,B A S E D ( . L c _ s p s i z e )
st % r14 ,_ _ S F _ B A C K C H A I N ( % r15 )
la % r12 ,S P _ P T R E G S ( % r15 )
xc 0 ( _ _ P T _ S I Z E ,% r12 ) ,0 ( % r12 )
l % r1 ,B A S E D ( . L d o _ e x e c v e )
lr % r5 ,% r12
basr % r14 ,% r1
ltr % r2 ,% r2
be B A S E D ( 0 f )
a % r15 ,B A S E D ( . L c _ s p s i z e )
lm % r12 ,% r15 ,4 8 ( % r15 )
br % r14
# execve s u c c e e d e d .
0 : stnsm _ _ S F _ E M P T Y ( % r15 ) ,0 x f c # d i s a b l e i n t e r r u p t s
l % r15 ,_ _ L C _ K E R N E L _ S T A C K # l o a d k s p
s % r15 ,B A S E D ( . L c _ s p s i z e ) # m a k e r o o m f o r r e g i s t e r s & p s w
mvc S P _ P T R E G S ( _ _ P T _ S I Z E ,% r15 ) ,0 ( % r12 ) # c o p y p t _ r e g s
2011-01-05 14:47:57 +03:00
l % r12 ,_ _ L C _ T H R E A D _ I N F O
2007-04-27 18:01:40 +04:00
xc _ _ S F _ B A C K C H A I N ( 4 ,% r15 ) ,_ _ S F _ B A C K C H A I N ( % r15 )
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x03 # r e e n a b l e i n t e r r u p t s
l % r1 ,B A S E D ( . L e x e c v e _ t a i l )
basr % r14 ,% r1
b B A S E D ( s y s c _ r e t u r n )
2005-04-17 02:20:36 +04:00
/ *
* Program c h e c k h a n d l e r r o u t i n e
* /
2006-09-28 18:56:37 +04:00
.globl pgm_check_handler
2005-04-17 02:20:36 +04:00
pgm_check_handler :
/ *
* First w e n e e d t o c h e c k f o r a s p e c i a l c a s e :
* Single s t e p p i n g a n i n s t r u c t i o n t h a t d i s a b l e s t h e P E R e v e n t m a s k w i l l
* cause a P E R e v e n t A F T E R t h e m a s k h a s b e e n s e t . E x a m p l e : S V C o r L P S W .
* For a s i n g l e s t e p p e d S V C t h e p r o g r a m c h e c k h a n d l e r g e t s c o n t r o l a f t e r
* the S V C n e w P S W h a s b e e n l o a d e d . B u t w e w a n t t o e x e c u t e t h e S V C f i r s t a n d
* then h a n d l e t h e P E R e v e n t . T h e r e f o r e w e u p d a t e t h e S V C o l d P S W t o p o i n t
* to t h e p g m _ c h e c k _ h a n d l e r a n d b r a n c h t o t h e S V C h a n d l e r a f t e r w e c h e c k e d
* if w e h a v e t o l o a d t h e k e r n e l s t a c k r e g i s t e r .
* For e v e r y o t h e r p o s s i b l e c a u s e f o r P E R e v e n t w i t h o u t t h e P E R m a s k s e t
* we j u s t i g n o r e t h e P E R e v e n t ( F I X M E : i s t h e r e a n y t h i n g w e h a v e t o d o
* for L P S W ? ) .
* /
2008-12-25 15:39:25 +03:00
stpt _ _ L C _ S Y N C _ E N T E R _ T I M E R
2005-04-17 02:20:36 +04:00
SAVE_ A L L _ B A S E _ _ L C _ S A V E _ A R E A
2006-09-28 18:56:37 +04:00
tm _ _ L C _ P G M _ I N T _ C O D E + 1 ,0 x80 # c h e c k w h e t h e r w e g o t a p e r e x c e p t i o n
bnz B A S E D ( p g m _ p e r ) # g o t p e r e x c e p t i o n - > s p e c i a l c a s e
2011-01-05 14:47:57 +03:00
SAVE_ A L L _ P G M _ _ L C _ P G M _ O L D _ P S W ,_ _ L C _ S A V E _ A R E A
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A
xc S P _ I L C ( 4 ,% r15 ) ,S P _ I L C ( % r15 )
mvc S P _ P S W ( 8 ,% r15 ) ,_ _ L C _ P G M _ O L D _ P S W
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # i n t e r r u p t i n g f r o m u s e r ?
bz B A S E D ( p g m _ n o _ v t i m e )
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ S Y N C _ E N T E R _ T I M E R
pgm_no_vtime :
2006-09-28 18:56:37 +04:00
l % r3 ,_ _ L C _ P G M _ I L C # l o a d p r o g r a m i n t e r r u p t i o n c o d e
2010-10-25 18:10:37 +04:00
l % r4 ,_ _ L C _ T R A N S _ E X C _ C O D E
REENABLE_ I R Q S
2005-04-17 02:20:36 +04:00
la % r8 ,0 x7 f
nr % r8 ,% r3
2006-09-28 18:56:37 +04:00
sll % r8 ,2
2011-01-05 14:47:57 +03:00
l % r1 ,B A S E D ( . L j u m p _ t a b l e )
l % r1 ,0 ( % r8 ,% r1 ) # l o a d a d d r e s s o f h a n d l e r r o u t i n e
2006-09-28 18:56:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # a d d r e s s o f r e g i s t e r - s a v e a r e a
2011-01-05 14:47:57 +03:00
basr % r14 ,% r1 # b r a n c h t o i n t e r r u p t - h a n d l e r
2010-05-17 12:00:02 +04:00
pgm_exit :
b B A S E D ( s y s c _ r e t u r n )
2005-04-17 02:20:36 +04:00
#
# handle p e r e x c e p t i o n
#
pgm_per :
2006-09-28 18:56:37 +04:00
tm _ _ L C _ P G M _ O L D _ P S W ,0 x40 # t e s t i f p e r e v e n t r e c o r d i n g i s o n
bnz B A S E D ( p g m _ p e r _ s t d ) # o k , n o r m a l p e r e v e n t f r o m u s e r s p a c e
2005-04-17 02:20:36 +04:00
# ok i t s o n e o f t h e s p e c i a l c a s e s , n o w w e n e e d t o f i n d o u t w h i c h o n e
2006-09-28 18:56:37 +04:00
clc _ _ L C _ P G M _ O L D _ P S W ( 8 ) ,_ _ L C _ S V C _ N E W _ P S W
be B A S E D ( p g m _ s v c p e r )
2005-04-17 02:20:36 +04:00
# no i n t e r e s t i n g s p e c i a l c a s e , i g n o r e P E R e v e n t
2006-09-28 18:56:37 +04:00
lm % r12 ,% r15 ,_ _ L C _ S A V E _ A R E A
lpsw 0 x28
2005-04-17 02:20:36 +04:00
#
# Normal p e r e x c e p t i o n
#
pgm_per_std :
2011-01-05 14:47:57 +03:00
SAVE_ A L L _ P G M _ _ L C _ P G M _ O L D _ P S W ,_ _ L C _ S A V E _ A R E A
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A
mvc S P _ P S W ( 8 ,% r15 ) ,_ _ L C _ P G M _ O L D _ P S W
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # i n t e r r u p t i n g f r o m u s e r ?
bz B A S E D ( p g m _ n o _ v t i m e 2 )
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ S Y N C _ E N T E R _ T I M E R
pgm_no_vtime2 :
2011-01-05 14:47:57 +03:00
l % r1 ,_ _ T I _ t a s k ( % r12 )
2010-05-17 12:00:02 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # k e r n e l p e r e v e n t ?
bz B A S E D ( k e r n e l _ p e r )
2011-01-05 14:48:10 +03:00
mvc _ _ T H R E A D _ p e r _ c a u s e ( 2 ,% r1 ) ,_ _ L C _ P E R _ C A U S E
mvc _ _ T H R E A D _ p e r _ a d d r e s s ( 4 ,% r1 ) ,_ _ L C _ P E R _ A D D R E S S
mvc _ _ T H R E A D _ p e r _ p a i d ( 1 ,% r1 ) ,_ _ L C _ P E R _ P A I D
oi _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ P E R _ T R A P # s e t T I F _ P E R _ T R A P
2006-09-28 18:56:37 +04:00
l % r3 ,_ _ L C _ P G M _ I L C # l o a d p r o g r a m i n t e r r u p t i o n c o d e
2010-10-25 18:10:37 +04:00
l % r4 ,_ _ L C _ T R A N S _ E X C _ C O D E
REENABLE_ I R Q S
2005-04-17 02:20:36 +04:00
la % r8 ,0 x7 f
2006-09-28 18:56:37 +04:00
nr % r8 ,% r3 # c l e a r p e r - e v e n t - b i t a n d i l c
2010-07-27 21:29:37 +04:00
be B A S E D ( p g m _ e x i t 2 ) # o n l y p e r o r p e r + c h e c k ?
sll % r8 ,2
2011-01-05 14:47:57 +03:00
l % r1 ,B A S E D ( . L j u m p _ t a b l e )
l % r1 ,0 ( % r8 ,% r1 ) # l o a d a d d r e s s o f h a n d l e r r o u t i n e
2010-07-27 21:29:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # a d d r e s s o f r e g i s t e r - s a v e a r e a
2011-01-05 14:47:57 +03:00
basr % r14 ,% r1 # b r a n c h t o i n t e r r u p t - h a n d l e r
2010-07-27 21:29:37 +04:00
pgm_exit2 :
b B A S E D ( s y s c _ r e t u r n )
2005-04-17 02:20:36 +04:00
#
# it w a s a s i n g l e s t e p p e d S V C t h a t i s c a u s i n g a l l t h e t r o u b l e
#
pgm_svcper :
2011-01-05 14:47:57 +03:00
SAVE_ A L L _ P G M _ _ L C _ S V C _ O L D _ P S W ,_ _ L C _ S A V E _ A R E A
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A
mvc S P _ P S W ( 8 ,% r15 ) ,_ _ L C _ S V C _ O L D _ P S W
mvc S P _ I L C ( 4 ,% r15 ) ,_ _ L C _ S V C _ I L C
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ S Y N C _ E N T E R _ T I M E R
2011-01-05 14:47:57 +03:00
l % r8 ,_ _ T I _ t a s k ( % r12 )
2011-01-05 14:48:10 +03:00
mvc _ _ T H R E A D _ p e r _ c a u s e ( 2 ,% r8 ) ,_ _ L C _ P E R _ C A U S E
mvc _ _ T H R E A D _ p e r _ a d d r e s s ( 4 ,% r8 ) ,_ _ L C _ P E R _ A D D R E S S
mvc _ _ T H R E A D _ p e r _ p a i d ( 1 ,% r8 ) ,_ _ L C _ P E R _ P A I D
oi _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ P E R _ T R A P # s e t T I F _ P E R _ T R A P
2005-04-17 02:20:36 +04:00
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x03 # r e e n a b l e i n t e r r u p t s
2010-05-17 12:00:02 +04:00
lm % r2 ,% r6 ,S P _ R 2 ( % r15 ) # l o a d s v c a r g u m e n t s
2005-04-17 02:20:36 +04:00
b B A S E D ( s y s c _ d o _ s v c )
2006-09-20 17:58:39 +04:00
#
# per w a s c a l l e d f r o m k e r n e l , m u s t b e k p r o b e s
#
kernel_per :
2010-10-29 18:50:45 +04:00
REENABLE_ I R Q S
2011-01-05 14:47:57 +03:00
xc S P _ S V C N R ( 2 ,% r15 ) ,S P _ S V C N R ( % r15 )
2006-09-20 17:58:39 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # a d d r e s s o f r e g i s t e r - s a v e a r e a
l % r1 ,B A S E D ( . L h a n d l e _ p e r ) # l o a d a d r . o f p e r h a n d l e r
2010-05-17 12:00:02 +04:00
basr % r14 ,% r1 # b r a n c h t o d o _ s i n g l e _ s t e p
b B A S E D ( p g m _ e x i t )
2006-09-20 17:58:39 +04:00
2005-04-17 02:20:36 +04:00
/ *
* IO i n t e r r u p t h a n d l e r r o u t i n e
* /
2006-09-28 18:56:37 +04:00
.globl io_int_handler
2005-04-17 02:20:36 +04:00
io_int_handler :
stck _ _ L C _ I N T _ C L O C K
2008-12-31 17:11:41 +03:00
stpt _ _ L C _ A S Y N C _ E N T E R _ T I M E R
2006-06-29 16:58:05 +04:00
SAVE_ A L L _ A S Y N C _ _ L C _ I O _ O L D _ P S W ,_ _ L C _ S A V E _ A R E A + 1 6
2011-01-05 14:47:57 +03:00
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A + 1 6
mvc S P _ P S W ( 8 ,% r15 ) ,0 ( % r12 ) # m o v e u s e r P S W t o s t a c k
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # i n t e r r u p t i n g f r o m u s e r ?
bz B A S E D ( i o _ n o _ v t i m e )
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R
io_no_vtime :
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O F F
2006-09-28 18:56:37 +04:00
l % r1 ,B A S E D ( . L d o _ I R Q ) # l o a d a d d r e s s o f d o _ I R Q
la % r2 ,S P _ P T R E G S ( % r15 ) # a d d r e s s o f r e g i s t e r - s a v e a r e a
basr % r14 ,% r1 # b r a n c h t o s t a n d a r d i r q h a n d l e r
2005-04-17 02:20:36 +04:00
io_return :
2010-05-17 12:00:02 +04:00
LOCKDEP_ S Y S _ E X I T
TRACE_ I R Q S _ O N
io_tif :
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ W O R K _ I N T
2006-09-28 18:56:37 +04:00
bnz B A S E D ( i o _ w o r k ) # t h e r e i s w o r k t o d o ( s i g n a l s e t c . )
2007-11-20 13:13:32 +03:00
io_restore :
2006-09-28 18:56:37 +04:00
RESTORE_ A L L _ _ L C _ R E T U R N _ P S W ,0
2005-09-04 02:57:56 +04:00
io_done :
2005-04-17 02:20:36 +04:00
2008-05-07 11:22:52 +04:00
#
2010-05-17 12:00:01 +04:00
# There i s w o r k t o d o , f i n d o u t i n w h i c h c o n t e x t w e h a v e b e e n i n t e r r u p t e d :
# 1 ) if w e r e t u r n t o u s e r s p a c e w e c a n d o a l l _ T I F _ W O R K _ I N T w o r k
# 2 ) if w e r e t u r n t o k e r n e l c o d e a n d p r e e m p t i v e s c h e d u l i n g i s e n a b l e d c h e c k
# the p r e e m p t i o n c o u n t e r a n d i f i t i s z e r o c a l l p r e e m p t _ s c h e d u l e _ i r q
# Before a n y w o r k c a n b e d o n e , a s w i t c h t o t h e k e r n e l s t a c k i s r e q u i r e d .
2008-05-07 11:22:52 +04:00
#
io_work :
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # r e t u r n i n g t o u s e r ?
2010-05-17 12:00:01 +04:00
bo B A S E D ( i o _ w o r k _ u s e r ) # y e s - > d o r e s c h e d & s i g n a l
# ifdef C O N F I G _ P R E E M P T
2008-05-07 11:22:52 +04:00
# check f o r p r e e m p t i v e s c h e d u l i n g
2011-01-05 14:47:57 +03:00
icm % r0 ,1 5 ,_ _ T I _ p r e c o u n t ( % r12 )
2008-05-07 11:22:52 +04:00
bnz B A S E D ( i o _ r e s t o r e ) # p r e e m p t i o n d i s a b l e d
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ N E E D _ R E S C H E D
2010-05-17 12:00:02 +04:00
bno B A S E D ( i o _ r e s t o r e )
2010-05-17 12:00:01 +04:00
# switch t o k e r n e l s t a c k
2005-04-17 02:20:36 +04:00
l % r1 ,S P _ R 1 5 ( % r15 )
s % r1 ,B A S E D ( . L c _ s p s i z e )
mvc S P _ P T R E G S ( _ _ P T _ S I Z E ,% r1 ) ,S P _ P T R E G S ( % r15 )
2006-09-28 18:56:37 +04:00
xc _ _ S F _ B A C K C H A I N ( 4 ,% r1 ) ,_ _ S F _ B A C K C H A I N ( % r1 ) # c l e a r b a c k c h a i n
2005-04-17 02:20:36 +04:00
lr % r15 ,% r1
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O N a l r e a d y d o n e a t i o _ r e t u r n , c a l l
# TRACE_ I R Q S _ O F F t o k e e p t h i n g s s y m m e t r i c a l
TRACE_ I R Q S _ O F F
2007-11-20 13:13:35 +03:00
l % r1 ,B A S E D ( . L p r e e m p t _ s c h e d u l e _ i r q )
2010-05-17 12:00:02 +04:00
basr % r14 ,% r1 # c a l l p r e e m p t _ s c h e d u l e _ i r q
b B A S E D ( i o _ r e t u r n )
# else
2010-05-17 12:00:01 +04:00
b B A S E D ( i o _ r e s t o r e )
2010-05-17 12:00:02 +04:00
# endif
2005-04-17 02:20:36 +04:00
2010-05-17 12:00:01 +04:00
#
# Need t o d o w o r k b e f o r e r e t u r n i n g t o u s e r s p a c e , s w i t c h t o k e r n e l s t a c k
#
2008-05-07 11:22:52 +04:00
io_work_user :
2005-04-17 02:20:36 +04:00
l % r1 ,_ _ L C _ K E R N E L _ S T A C K
s % r1 ,B A S E D ( . L c _ s p s i z e )
mvc S P _ P T R E G S ( _ _ P T _ S I Z E ,% r1 ) ,S P _ P T R E G S ( % r15 )
2006-09-28 18:56:37 +04:00
xc _ _ S F _ B A C K C H A I N ( 4 ,% r1 ) ,_ _ S F _ B A C K C H A I N ( % r1 ) # c l e a r b a c k c h a i n
2005-04-17 02:20:36 +04:00
lr % r15 ,% r1
2010-05-17 12:00:02 +04:00
2005-04-17 02:20:36 +04:00
#
# One o f t h e w o r k b i t s i s o n . F i n d o u t w h i c h o n e .
2010-05-17 12:00:01 +04:00
# Checked a r e : _ T I F _ S I G P E N D I N G , _ T I F _ N O T I F Y _ R E S U M E , _ T I F _ N E E D _ R E S C H E D
2006-09-28 18:56:37 +04:00
# and _ T I F _ M C C K _ P E N D I N G
2005-04-17 02:20:36 +04:00
#
2010-05-17 12:00:02 +04:00
io_work_tif :
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ M C C K _ P E N D I N G
2006-09-28 18:56:37 +04:00
bo B A S E D ( i o _ m c c k _ p e n d i n g )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ N E E D _ R E S C H E D
2005-04-17 02:20:36 +04:00
bo B A S E D ( i o _ r e s c h e d u l e )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ S I G P E N D I N G
2010-05-17 12:00:01 +04:00
bo B A S E D ( i o _ s i g p e n d i n g )
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ N O T I F Y _ R E S U M E
2010-05-17 12:00:01 +04:00
bo B A S E D ( i o _ n o t i f y _ r e s u m e )
b B A S E D ( i o _ r e t u r n ) # b e w a r e o f c r i t i c a l s e c t i o n c l e a n u p
2005-04-17 02:20:36 +04:00
2005-06-26 01:55:30 +04:00
#
# _ TIF_ M C C K _ P E N D I N G i s s e t , c a l l h a n d l e r
#
io_mcck_pending :
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O N a l r e a d y d o n e a t i o _ r e t u r n
2005-06-26 01:55:30 +04:00
l % r1 ,B A S E D ( . L s39 0 _ h a n d l e _ m c c k )
2007-07-27 14:29:18 +04:00
basr % r14 ,% r1 # T I F b i t w i l l b e c l e a r e d b y h a n d l e r
2010-05-17 12:00:02 +04:00
TRACE_ I R Q S _ O F F
b B A S E D ( i o _ r e t u r n )
2005-06-26 01:55:30 +04:00
2005-04-17 02:20:36 +04:00
#
# _ TIF_ N E E D _ R E S C H E D i s s e t , c a l l s c h e d u l e
2006-09-28 18:56:37 +04:00
#
io_reschedule :
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O N a l r e a d y d o n e a t i o _ r e t u r n
2006-09-28 18:56:37 +04:00
l % r1 ,B A S E D ( . L s c h e d u l e )
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x03 # r e e n a b l e i n t e r r u p t s
basr % r14 ,% r1 # c a l l s c h e d u l e r
stnsm _ _ S F _ E M P T Y ( % r15 ) ,0 x f c # d i s a b l e I / O a n d e x t . i n t e r r u p t s
2007-11-20 13:13:32 +03:00
TRACE_ I R Q S _ O F F
2010-05-17 12:00:02 +04:00
b B A S E D ( i o _ r e t u r n )
2005-04-17 02:20:36 +04:00
#
2008-04-30 11:53:08 +04:00
# _ TIF_ S I G P E N D I N G i s s e t , c a l l d o _ s i g n a l
2005-04-17 02:20:36 +04:00
#
2006-09-28 18:56:37 +04:00
io_sigpending :
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O N a l r e a d y d o n e a t i o _ r e t u r n
2006-09-28 18:56:37 +04:00
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x03 # r e e n a b l e i n t e r r u p t s
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
l % r1 ,B A S E D ( . L d o _ s i g n a l )
basr % r14 ,% r1 # c a l l d o _ s i g n a l
stnsm _ _ S F _ E M P T Y ( % r15 ) ,0 x f c # d i s a b l e I / O a n d e x t . i n t e r r u p t s
2007-11-20 13:13:32 +03:00
TRACE_ I R Q S _ O F F
2010-05-17 12:00:02 +04:00
b B A S E D ( i o _ r e t u r n )
2005-04-17 02:20:36 +04:00
2008-10-10 23:33:20 +04:00
#
# _ TIF_ S I G P E N D I N G i s s e t , c a l l d o _ s i g n a l
#
io_notify_resume :
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O N a l r e a d y d o n e a t i o _ r e t u r n
2008-10-10 23:33:20 +04:00
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x03 # r e e n a b l e i n t e r r u p t s
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
l % r1 ,B A S E D ( . L d o _ n o t i f y _ r e s u m e )
basr % r14 ,% r1 # c a l l d o _ s i g n a l
stnsm _ _ S F _ E M P T Y ( % r15 ) ,0 x f c # d i s a b l e I / O a n d e x t . i n t e r r u p t s
TRACE_ I R Q S _ O F F
2010-05-17 12:00:02 +04:00
b B A S E D ( i o _ r e t u r n )
2008-10-10 23:33:20 +04:00
2005-04-17 02:20:36 +04:00
/ *
* External i n t e r r u p t h a n d l e r r o u t i n e
* /
2006-09-28 18:56:37 +04:00
.globl ext_int_handler
2005-04-17 02:20:36 +04:00
ext_int_handler :
stck _ _ L C _ I N T _ C L O C K
2008-12-31 17:11:41 +03:00
stpt _ _ L C _ A S Y N C _ E N T E R _ T I M E R
2006-06-29 16:58:05 +04:00
SAVE_ A L L _ A S Y N C _ _ L C _ E X T _ O L D _ P S W ,_ _ L C _ S A V E _ A R E A + 1 6
2011-01-05 14:47:57 +03:00
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A + 1 6
mvc S P _ P S W ( 8 ,% r15 ) ,0 ( % r12 ) # m o v e u s e r P S W t o s t a c k
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2005-04-17 02:20:36 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # i n t e r r u p t i n g f r o m u s e r ?
bz B A S E D ( e x t _ n o _ v t i m e )
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R
ext_no_vtime :
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O F F
2006-09-28 18:56:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # a d d r e s s o f r e g i s t e r - s a v e a r e a
2010-10-25 18:10:38 +04:00
l % r3 ,_ _ L C _ C P U _ A D D R E S S # g e t c p u a d d r e s s + i n t e r r u p t i o n c o d e
l % r4 ,_ _ L C _ E X T _ P A R A M S # g e t e x t e r n a l p a r a m e t e r s
2005-04-17 02:20:36 +04:00
l % r1 ,B A S E D ( . L d o _ e x t i n t )
basr % r14 ,% r1
b B A S E D ( i o _ r e t u r n )
2005-09-04 02:57:56 +04:00
__critical_end :
2005-04-17 02:20:36 +04:00
/ *
* Machine c h e c k h a n d l e r r o u t i n e s
* /
2006-09-28 18:56:37 +04:00
.globl mcck_int_handler
2005-04-17 02:20:36 +04:00
mcck_int_handler :
2010-05-17 12:00:03 +04:00
stck _ _ L C _ M C C K _ C L O C K
2005-06-26 01:55:30 +04:00
spt _ _ L C _ C P U _ T I M E R _ S A V E _ A R E A # r e v a l i d a t e c p u t i m e r
lm % r0 ,% r15 ,_ _ L C _ G P R E G S _ S A V E _ A R E A # r e v a l i d a t e g p r s
2005-04-17 02:20:36 +04:00
SAVE_ A L L _ B A S E _ _ L C _ S A V E _ A R E A + 3 2
2005-06-26 01:55:30 +04:00
la % r12 ,_ _ L C _ M C K _ O L D _ P S W
2006-09-28 18:56:37 +04:00
tm _ _ L C _ M C C K _ C O D E ,0 x80 # s y s t e m d a m a g e ?
2005-06-26 01:55:30 +04:00
bo B A S E D ( m c c k _ i n t _ m a i n ) # y e s - > r e s t o f m c c k c o d e i n v a l i d
2010-05-17 12:00:03 +04:00
mvc _ _ L C _ M C C K _ E N T E R _ T I M E R ( 8 ) ,_ _ L C _ C P U _ T I M E R _ S A V E _ A R E A
2006-06-29 16:58:05 +04:00
tm _ _ L C _ M C C K _ C O D E + 5 ,0 x02 # s t o r e d c p u t i m e r v a l u e v a l i d ?
bo B A S E D ( 1 f )
la % r14 ,_ _ L C _ S Y N C _ E N T E R _ T I M E R
clc 0 ( 8 ,% r14 ) ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R
bl B A S E D ( 0 f )
la % r14 ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R
0 : clc 0 ( 8 ,% r14 ) ,_ _ L C _ E X I T _ T I M E R
bl B A S E D ( 0 f )
la % r14 ,_ _ L C _ E X I T _ T I M E R
0 : clc 0 ( 8 ,% r14 ) ,_ _ L C _ L A S T _ U P D A T E _ T I M E R
bl B A S E D ( 0 f )
la % r14 ,_ _ L C _ L A S T _ U P D A T E _ T I M E R
0 : spt 0 ( % r14 )
2010-05-17 12:00:03 +04:00
mvc _ _ L C _ M C C K _ E N T E R _ T I M E R ( 8 ) ,0 ( % r14 )
2008-12-25 15:39:25 +03:00
1 : tm _ _ L C _ M C C K _ C O D E + 2 ,0 x09 # m w p + i a o f o l d p s w v a l i d ?
2005-06-26 01:55:30 +04:00
bno B A S E D ( m c c k _ i n t _ m a i n ) # n o - > s k i p c l e a n u p c r i t i c a l
tm _ _ L C _ M C K _ O L D _ P S W + 1 ,0 x01 # t e s t p r o b l e m s t a t e b i t
bnz B A S E D ( m c c k _ i n t _ m a i n ) # f r o m u s e r - > l o a d a s y n c s t a c k
clc _ _ L C _ M C K _ O L D _ P S W + 4 ( 4 ) ,B A S E D ( . L c r i t i c a l _ e n d )
bhe B A S E D ( m c c k _ i n t _ m a i n )
clc _ _ L C _ M C K _ O L D _ P S W + 4 ( 4 ) ,B A S E D ( . L c r i t i c a l _ s t a r t )
bl B A S E D ( m c c k _ i n t _ m a i n )
l % r14 ,B A S E D ( . L c l e a n u p _ c r i t i c a l )
basr % r14 ,% r14
mcck_int_main :
l % r14 ,_ _ L C _ P A N I C _ S T A C K # a r e w e a l r e a d y o n t h e p a n i c s t a c k ?
slr % r14 ,% r15
sra % r14 ,P A G E _ S H I F T
be B A S E D ( 0 f )
l % r15 ,_ _ L C _ P A N I C _ S T A C K # l o a d p a n i c s t a c k
2011-01-05 14:47:57 +03:00
0 : s % r15 ,B A S E D ( . L c _ s p s i z e ) # m a k e r o o m f o r r e g i s t e r s & p s w
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A + 3 2
mvc S P _ P S W ( 8 ,% r15 ) ,0 ( % r12 )
l % r12 ,_ _ L C _ T H R E A D _ I N F O # l o a d p o i n t e r t o t h r e a d _ i n f o s t r u c t
2006-09-28 18:56:37 +04:00
tm _ _ L C _ M C C K _ C O D E + 2 ,0 x08 # m w p o f o l d p s w v a l i d ?
2005-09-04 02:57:56 +04:00
bno B A S E D ( m c c k _ n o _ v t i m e ) # n o - > s k i p c l e a n u p c r i t i c a l
2006-06-29 16:58:05 +04:00
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # i n t e r r u p t i n g f r o m u s e r ?
2005-09-04 02:57:56 +04:00
bz B A S E D ( m c c k _ n o _ v t i m e )
2010-05-17 12:00:03 +04:00
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ M C C K _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
2005-09-04 02:57:56 +04:00
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
2010-05-17 12:00:03 +04:00
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ M C C K _ E N T E R _ T I M E R
2005-09-04 02:57:56 +04:00
mcck_no_vtime :
2005-06-26 01:55:30 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
2006-09-28 18:56:37 +04:00
l % r1 ,B A S E D ( . L s39 0 _ m c c k )
basr % r14 ,% r1 # c a l l m a c h i n e c h e c k h a n d l e r
tm S P _ P S W + 1 ( % r15 ) ,0 x01 # r e t u r n i n g t o u s e r ?
2005-06-26 01:55:30 +04:00
bno B A S E D ( m c c k _ r e t u r n )
2006-09-28 18:56:37 +04:00
l % r1 ,_ _ L C _ K E R N E L _ S T A C K # s w i t c h t o k e r n e l s t a c k
2005-06-26 01:55:30 +04:00
s % r1 ,B A S E D ( . L c _ s p s i z e )
mvc S P _ P T R E G S ( _ _ P T _ S I Z E ,% r1 ) ,S P _ P T R E G S ( % r15 )
2006-09-28 18:56:37 +04:00
xc _ _ S F _ B A C K C H A I N ( 4 ,% r1 ) ,_ _ S F _ B A C K C H A I N ( % r1 ) # c l e a r b a c k c h a i n
2005-06-26 01:55:30 +04:00
lr % r15 ,% r1
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x04 # t u r n d a t o n
2011-01-05 14:47:57 +03:00
tm _ _ T I _ f l a g s + 3 ( % r12 ) ,_ T I F _ M C C K _ P E N D I N G
2005-06-26 01:55:30 +04:00
bno B A S E D ( m c c k _ r e t u r n )
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O F F
2005-06-26 01:55:30 +04:00
l % r1 ,B A S E D ( . L s39 0 _ h a n d l e _ m c c k )
basr % r14 ,% r1 # c a l l m a c h i n e c h e c k h a n d l e r
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O N
2005-04-17 02:20:36 +04:00
mcck_return :
2006-06-29 16:58:05 +04:00
mvc _ _ L C _ R E T U R N _ M C C K _ P S W ( 8 ) ,S P _ P S W ( % r15 ) # m o v e r e t u r n P S W
ni _ _ L C _ R E T U R N _ M C C K _ P S W + 1 ,0 x f d # c l e a r w a i t s t a t e b i t
tm _ _ L C _ R E T U R N _ M C C K _ P S W + 1 ,0 x01 # r e t u r n i n g t o u s e r ?
bno B A S E D ( 0 f )
lm % r0 ,% r15 ,S P _ R 0 ( % r15 ) # l o a d g p r s 0 - 1 5
stpt _ _ L C _ E X I T _ T I M E R
lpsw _ _ L C _ R E T U R N _ M C C K _ P S W # b a c k t o c a l l e r
2008-12-25 15:39:25 +03:00
0 : lm % r0 ,% r15 ,S P _ R 0 ( % r15 ) # l o a d g p r s 0 - 1 5
2006-06-29 16:58:05 +04:00
lpsw _ _ L C _ R E T U R N _ M C C K _ P S W # b a c k t o c a l l e r
2006-09-28 18:56:37 +04:00
RESTORE_ A L L _ _ L C _ R E T U R N _ M C C K _ P S W ,0
2005-04-17 02:20:36 +04:00
/ *
* Restart i n t e r r u p t i o n h a n d l e r , k i c k s t a r t e r f o r a d d i t i o n a l C P U s
* /
2007-06-19 15:10:03 +04:00
# ifdef C O N F I G _ S M P
2008-02-05 18:50:40 +03:00
_ _ CPUINIT
2006-09-28 18:56:37 +04:00
.globl restart_int_handler
2005-04-17 02:20:36 +04:00
restart_int_handler :
2009-04-14 17:36:27 +04:00
basr % r1 ,0
restart_base :
spt r e s t a r t _ v t i m e - r e s t a r t _ b a s e ( % r1 )
stck _ _ L C _ L A S T _ U P D A T E _ C L O C K
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,r e s t a r t _ v t i m e - r e s t a r t _ b a s e ( % r1 )
mvc _ _ L C _ E X I T _ T I M E R ( 8 ) ,r e s t a r t _ v t i m e - r e s t a r t _ b a s e ( % r1 )
2006-09-28 18:56:37 +04:00
l % r15 ,_ _ L C _ S A V E _ A R E A + 6 0 # l o a d k s p
lctl % c0 ,% c15 ,_ _ L C _ C R E G S _ S A V E _ A R E A # g e t n e w c t l r e g s
lam % a0 ,% a15 ,_ _ L C _ A R E G S _ S A V E _ A R E A
lm % r6 ,% r15 ,_ _ S F _ G P R S ( % r15 ) # l o a d r e g i s t e r s f r o m c l o n e
2009-04-14 17:36:27 +04:00
l % r1 ,_ _ L C _ T H R E A D _ I N F O
mvc _ _ L C _ U S E R _ T I M E R ( 8 ) ,_ _ T I _ u s e r _ t i m e r ( % r1 )
mvc _ _ L C _ S Y S T E M _ T I M E R ( 8 ) ,_ _ T I _ s y s t e m _ t i m e r ( % r1 )
xc _ _ L C _ S T E A L _ T I M E R ( 8 ) ,_ _ L C _ S T E A L _ T I M E R
2006-09-28 18:56:37 +04:00
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x04 # n o w w e c a n t u r n d a t o n
basr % r14 ,0
l % r14 ,r e s t a r t _ a d d r - . ( % r14 )
2011-05-10 19:13:39 +04:00
basr % r14 ,% r14 # b r a n c h t o s t a r t _ s e c o n d a r y
2005-04-17 02:20:36 +04:00
restart_addr :
2006-09-28 18:56:37 +04:00
.long start_secondary
2009-04-14 17:36:27 +04:00
.align 8
restart_vtime :
.long 0 x7 f f f f f f f ,0 x f f f f f f f f
2007-06-19 15:10:03 +04:00
.previous
2005-04-17 02:20:36 +04:00
# else
/ *
* If w e d o n o t r u n w i t h S M P e n a b l e d , l e t t h e n e w C P U c r a s h . . .
* /
2006-09-28 18:56:37 +04:00
.globl restart_int_handler
2005-04-17 02:20:36 +04:00
restart_int_handler :
2006-09-28 18:56:37 +04:00
basr % r1 ,0
2005-04-17 02:20:36 +04:00
restart_base :
2006-09-28 18:56:37 +04:00
lpsw r e s t a r t _ c r a s h - r e s t a r t _ b a s e ( % r1 )
.align 8
2005-04-17 02:20:36 +04:00
restart_crash :
2006-09-28 18:56:37 +04:00
.long 0 x0 0 0 a00 0 0 ,0 x00 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
restart_go :
# endif
2011-01-05 14:47:25 +03:00
.section .kprobes .text , " ax"
2005-04-17 02:20:36 +04:00
# ifdef C O N F I G _ C H E C K _ S T A C K
/ *
* The s y n c h r o n o u s o r t h e a s y n c h r o n o u s s t a c k o v e r f l o w e d . W e a r e d e a d .
* No n e e d t o p r o p e r l y s a v e t h e r e g i s t e r s , w e a r e g o i n g t o p a n i c a n y w a y .
* Setup a p t _ r e g s s o t h a t s h o w _ t r a c e c a n p r o v i d e a g o o d c a l l t r a c e .
* /
stack_overflow :
l % r15 ,_ _ L C _ P A N I C _ S T A C K # c h a n g e t o p a n i c s t a c k
sl % r15 ,B A S E D ( . L c _ s p s i z e )
mvc S P _ P S W ( 8 ,% r15 ) ,0 ( % r12 ) # m o v e u s e r P S W t o s t a c k
stm % r0 ,% r11 ,S P _ R 0 ( % r15 ) # s t o r e g p r s % r 0 - % r11 t o k e r n e l s t a c k
la % r1 ,_ _ L C _ S A V E _ A R E A
ch % r12 ,B A S E D ( . L 0 x02 0 ) # o l d p s w a d d r = = _ _ L C _ S V C _ O L D _ P S W ?
be B A S E D ( 0 f )
ch % r12 ,B A S E D ( . L 0 x02 8 ) # o l d p s w a d d r = = _ _ L C _ P G M _ O L D _ P S W ?
be B A S E D ( 0 f )
la % r1 ,_ _ L C _ S A V E _ A R E A + 1 6
0 : mvc S P _ R 1 2 ( 1 6 ,% r15 ) ,0 ( % r1 ) # m o v e % r 12 - % r15 t o s t a c k
2006-09-28 18:56:37 +04:00
xc _ _ S F _ B A C K C H A I N ( 4 ,% r15 ) ,_ _ S F _ B A C K C H A I N ( % r15 ) # c l e a r b a c k c h a i n
2005-04-17 02:20:36 +04:00
l % r1 ,B A S E D ( 1 f ) # b r a n c h t o k e r n e l _ s t a c k _ o v e r f l o w
2006-09-28 18:56:37 +04:00
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
2005-04-17 02:20:36 +04:00
br % r1
2006-09-28 18:56:37 +04:00
1 : .long k e r n e l _ s t a c k _ o v e r f l o w
2005-04-17 02:20:36 +04:00
# endif
cleanup_table_system_call :
.long system_call + 0 x8 0 0 0 0 0 0 0 , s y s c _ d o _ s v c + 0 x80 0 0 0 0 0 0
2010-05-17 12:00:02 +04:00
cleanup_table_sysc_tif :
.long sysc_tif + 0 x8 0 0 0 0 0 0 0 , s y s c _ r e s t o r e + 0 x80 0 0 0 0 0 0
cleanup_table_sysc_restore :
.long sysc_restore + 0 x8 0 0 0 0 0 0 0 , s y s c _ d o n e + 0 x80 0 0 0 0 0 0
cleanup_table_io_tif :
.long io_tif + 0 x8 0 0 0 0 0 0 0 , i o _ r e s t o r e + 0 x80 0 0 0 0 0 0
cleanup_table_io_restore :
.long io_restore + 0 x8 0 0 0 0 0 0 0 , i o _ d o n e + 0 x80 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
cleanup_critical :
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s t e m _ c a l l )
bl B A S E D ( 0 f )
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s t e m _ c a l l + 4 )
bl B A S E D ( c l e a n u p _ s y s t e m _ c a l l )
0 :
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s c _ t i f )
2005-04-17 02:20:36 +04:00
bl B A S E D ( 0 f )
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s c _ t i f + 4 )
bl B A S E D ( c l e a n u p _ s y s c _ t i f )
2005-04-17 02:20:36 +04:00
0 :
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s c _ r e s t o r e )
2005-04-17 02:20:36 +04:00
bl B A S E D ( 0 f )
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s c _ r e s t o r e + 4 )
bl B A S E D ( c l e a n u p _ s y s c _ r e s t o r e )
2006-06-29 16:58:05 +04:00
0 :
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ i o _ t i f )
2006-06-29 16:58:05 +04:00
bl B A S E D ( 0 f )
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ i o _ t i f + 4 )
bl B A S E D ( c l e a n u p _ i o _ t i f )
2005-09-04 02:57:56 +04:00
0 :
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ i o _ r e s t o r e )
2005-09-04 02:57:56 +04:00
bl B A S E D ( 0 f )
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ i o _ r e s t o r e + 4 )
bl B A S E D ( c l e a n u p _ i o _ r e s t o r e )
2005-04-17 02:20:36 +04:00
0 :
br % r14
cleanup_system_call :
mvc _ _ L C _ R E T U R N _ P S W ( 8 ) ,0 ( % r12 )
clc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ s y s t e m _ c a l l _ i n s n + 4 )
bh B A S E D ( 0 f )
2010-05-17 12:00:03 +04:00
mvc _ _ L C _ S Y N C _ E N T E R _ T I M E R ( 8 ) ,_ _ L C _ M C C K _ E N T E R _ T I M E R
c % r12 ,B A S E D ( . L m c k _ o l d _ p s w )
be B A S E D ( 0 f )
2005-04-17 02:20:36 +04:00
mvc _ _ L C _ S Y N C _ E N T E R _ T I M E R ( 8 ) ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R
2010-05-17 12:00:03 +04:00
0 : c % r12 ,B A S E D ( . L m c k _ o l d _ p s w )
la % r12 ,_ _ L C _ S A V E _ A R E A + 3 2
be B A S E D ( 0 f )
la % r12 ,_ _ L C _ S A V E _ A R E A + 1 6
2005-04-17 02:20:36 +04:00
0 : clc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ s y s t e m _ c a l l _ i n s n + 8 )
bhe B A S E D ( c l e a n u p _ v t i m e )
clc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ s y s t e m _ c a l l _ i n s n )
bh B A S E D ( 0 f )
2005-09-04 02:57:56 +04:00
mvc _ _ L C _ S A V E _ A R E A ( 1 6 ) ,0 ( % r12 )
0 : st % r13 ,4 ( % r12 )
2011-01-05 14:47:57 +03:00
l % r15 ,_ _ L C _ K E R N E L _ S T A C K # p r o b l e m s t a t e - > l o a d k s p
s % r15 ,B A S E D ( . L c _ s p s i z e ) # m a k e r o o m f o r r e g i s t e r s & p s w
2005-09-04 02:57:56 +04:00
st % r15 ,1 2 ( % r12 )
2011-01-05 14:47:57 +03:00
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A
mvc S P _ P S W ( 8 ,% r15 ) ,_ _ L C _ S V C _ O L D _ P S W
mvc S P _ I L C ( 4 ,% r15 ) ,_ _ L C _ S V C _ I L C
mvc 0 ( 4 ,% r12 ) ,_ _ L C _ T H R E A D _ I N F O
2005-04-17 02:20:36 +04:00
cleanup_vtime :
clc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ s y s t e m _ c a l l _ i n s n + 1 2 )
bhe B A S E D ( c l e a n u p _ s t i m e )
UPDATE_ V T I M E _ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y N C _ E N T E R _ T I M E R ,_ _ L C _ U S E R _ T I M E R
cleanup_stime :
clc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ s y s t e m _ c a l l _ i n s n + 1 6 )
bh B A S E D ( c l e a n u p _ u p d a t e )
UPDATE_ V T I M E _ _ L C _ L A S T _ U P D A T E _ T I M E R ,_ _ L C _ E X I T _ T I M E R ,_ _ L C _ S Y S T E M _ T I M E R
cleanup_update :
mvc _ _ L C _ L A S T _ U P D A T E _ T I M E R ( 8 ) ,_ _ L C _ S Y N C _ E N T E R _ T I M E R
mvc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s t e m _ c a l l + 4 )
la % r12 ,_ _ L C _ R E T U R N _ P S W
br % r14
cleanup_system_call_insn :
.long sysc_saveall + 0 x8 0 0 0 0 0 0 0
2006-09-28 18:56:37 +04:00
.long system_call + 0 x8 0 0 0 0 0 0 0
.long sysc_vtime + 0 x8 0 0 0 0 0 0 0
.long sysc_stime + 0 x8 0 0 0 0 0 0 0
.long sysc_update + 0 x8 0 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
2010-05-17 12:00:02 +04:00
cleanup_sysc_tif :
2005-04-17 02:20:36 +04:00
mvc _ _ L C _ R E T U R N _ P S W ( 4 ) ,0 ( % r12 )
2010-05-17 12:00:02 +04:00
mvc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ t a b l e _ s y s c _ t i f )
2005-04-17 02:20:36 +04:00
la % r12 ,_ _ L C _ R E T U R N _ P S W
br % r14
2010-05-17 12:00:02 +04:00
cleanup_sysc_restore :
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ s y s c _ r e s t o r e _ i n s n )
2005-09-04 02:57:56 +04:00
be B A S E D ( 2 f )
2010-05-17 12:00:03 +04:00
mvc _ _ L C _ E X I T _ T I M E R ( 8 ) ,_ _ L C _ M C C K _ E N T E R _ T I M E R
c % r12 ,B A S E D ( . L m c k _ o l d _ p s w )
be B A S E D ( 0 f )
2005-04-17 02:20:36 +04:00
mvc _ _ L C _ E X I T _ T I M E R ( 8 ) ,_ _ L C _ A S Y N C _ E N T E R _ T I M E R
2010-05-17 12:00:03 +04:00
0 : clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ s y s c _ r e s t o r e _ i n s n + 4 )
2005-09-04 02:57:56 +04:00
be B A S E D ( 2 f )
2005-04-17 02:20:36 +04:00
mvc _ _ L C _ R E T U R N _ P S W ( 8 ) ,S P _ P S W ( % r15 )
2005-09-04 02:57:56 +04:00
c % r12 ,B A S E D ( . L m c k _ o l d _ p s w )
2010-05-17 12:00:03 +04:00
la % r12 ,_ _ L C _ S A V E _ A R E A + 3 2
be B A S E D ( 1 f )
la % r12 ,_ _ L C _ S A V E _ A R E A + 1 6
1 : mvc 0 ( 1 6 ,% r12 ) ,S P _ R 1 2 ( % r15 )
lm % r0 ,% r11 ,S P _ R 0 ( % r15 )
2005-04-17 02:20:36 +04:00
l % r15 ,S P _ R 1 5 ( % r15 )
2005-09-04 02:57:56 +04:00
2 : la % r12 ,_ _ L C _ R E T U R N _ P S W
2005-04-17 02:20:36 +04:00
br % r14
2010-05-17 12:00:02 +04:00
cleanup_sysc_restore_insn :
2007-11-20 13:13:32 +03:00
.long sysc_done - 4 + 0 x8 0 0 0 0 0 0 0
.long sysc_done - 8 + 0 x8 0 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
2010-05-17 12:00:02 +04:00
cleanup_io_tif :
2010-04-09 15:43:00 +04:00
mvc _ _ L C _ R E T U R N _ P S W ( 4 ) ,0 ( % r12 )
2010-05-17 12:00:02 +04:00
mvc _ _ L C _ R E T U R N _ P S W + 4 ( 4 ) ,B A S E D ( c l e a n u p _ t a b l e _ i o _ t i f )
2010-04-09 15:43:00 +04:00
la % r12 ,_ _ L C _ R E T U R N _ P S W
br % r14
2010-05-17 12:00:02 +04:00
cleanup_io_restore :
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ i o _ r e s t o r e _ i n s n )
2010-05-17 12:00:03 +04:00
be B A S E D ( 1 f )
mvc _ _ L C _ E X I T _ T I M E R ( 8 ) ,_ _ L C _ M C C K _ E N T E R _ T I M E R
2010-05-17 12:00:02 +04:00
clc 4 ( 4 ,% r12 ) ,B A S E D ( c l e a n u p _ i o _ r e s t o r e _ i n s n + 4 )
2010-05-17 12:00:03 +04:00
be B A S E D ( 1 f )
2005-09-04 02:57:56 +04:00
mvc _ _ L C _ R E T U R N _ P S W ( 8 ) ,S P _ P S W ( % r15 )
mvc _ _ L C _ S A V E _ A R E A + 3 2 ( 1 6 ) ,S P _ R 1 2 ( % r15 )
2010-05-17 12:00:03 +04:00
lm % r0 ,% r11 ,S P _ R 0 ( % r15 )
2005-09-04 02:57:56 +04:00
l % r15 ,S P _ R 1 5 ( % r15 )
2010-05-17 12:00:03 +04:00
1 : la % r12 ,_ _ L C _ R E T U R N _ P S W
2005-09-04 02:57:56 +04:00
br % r14
2010-05-17 12:00:02 +04:00
cleanup_io_restore_insn :
2007-11-20 13:13:32 +03:00
.long io_done - 4 + 0 x8 0 0 0 0 0 0 0
.long io_done - 8 + 0 x8 0 0 0 0 0 0 0
2005-09-04 02:57:56 +04:00
2005-04-17 02:20:36 +04:00
/ *
* Integer c o n s t a n t s
* /
2006-09-28 18:56:37 +04:00
.align 4
.Lc_spsize : .long SP_SIZE
.Lc_overhead : .long STACK_FRAME_OVERHEAD
.Lnr_syscalls : .long NR_syscalls
.L0x018 : .short 0x018
.L0x020 : .short 0x020
.L0x028 : .short 0x028
.L0x030 : .short 0x030
.L0x038 : .short 0x038
.Lc_1 : .long 1
2005-04-17 02:20:36 +04:00
/ *
* Symbol c o n s t a n t s
* /
2006-09-28 18:56:37 +04:00
.Ls390_mcck : .long s390_do_machine_check
2005-06-26 01:55:30 +04:00
.Ls390_handle_mcck :
2006-09-28 18:56:37 +04:00
.long s390_handle_mcck
.Lmck_old_psw : .long __LC_MCK_OLD_PSW
.Ldo_IRQ : .long do_IRQ
.Ldo_extint : .long do_extint
.Ldo_signal : .long do_signal
2008-10-10 23:33:20 +04:00
.Ldo_notify_resume :
.long do_notify_resume
2011-01-05 14:48:10 +03:00
.Lhandle_per : .long do_per_trap
2007-04-27 18:01:40 +04:00
.Ldo_execve : .long do_execve
.Lexecve_tail : .long execve_tail
2006-09-28 18:56:37 +04:00
.Ljump_table : .long pgm_check_table
.Lschedule : .long schedule
2007-12-04 18:09:04 +03:00
# ifdef C O N F I G _ P R E E M P T
2007-11-20 13:13:35 +03:00
.Lpreempt_schedule_irq :
.long preempt_schedule_irq
2007-12-04 18:09:04 +03:00
# endif
2008-10-10 23:33:20 +04:00
.Ltrace_entry : .long do_syscall_trace_enter
.Ltrace_exit : .long do_syscall_trace_exit
2006-09-28 18:56:37 +04:00
.Lschedtail : .long schedule_tail
.Lsysc_table : .long sys_call_table
2006-07-03 11:24:46 +04:00
# ifdef C O N F I G _ T R A C E _ I R Q F L A G S
2008-11-14 20:18:05 +03:00
.Ltrace_irq_on_caller :
.long trace_hardirqs_on_caller
.Ltrace_irq_off_caller :
.long trace_hardirqs_off_caller
2008-11-14 20:18:03 +03:00
# endif
# ifdef C O N F I G _ L O C K D E P
2007-10-12 00:11:12 +04:00
.Llockdep_sys_exit :
.long lockdep_sys_exit
2006-07-03 11:24:46 +04:00
# endif
2005-04-17 02:20:36 +04:00
.Lcritical_start :
2006-09-28 18:56:37 +04:00
.long __critical_start + 0 x8 0 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
.Lcritical_end :
2006-09-28 18:56:37 +04:00
.long __critical_end + 0 x8 0 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
.Lcleanup_critical :
2006-09-28 18:56:37 +04:00
.long cleanup_critical
2005-04-17 02:20:36 +04:00
2006-09-28 18:56:37 +04:00
.section .rodata , " a"
2005-04-17 02:20:36 +04:00
# define S Y S C A L L ( e s a ,e s a m e ,e m u ) . l o n g e s a
2009-06-12 12:26:47 +04:00
.globl sys_call_table
2005-04-17 02:20:36 +04:00
sys_call_table :
# include " s y s c a l l s . S "
# undef S Y S C A L L