2005-04-17 02:20:36 +04:00
/ *
2006-02-01 14:06:38 +03:00
* arch/ s39 0 / k e r n e l / e n t r y 6 4 . S
2005-04-17 02:20:36 +04:00
* S3 9 0 l o w - l e v e l e n t r y p o i n t s .
*
2010-05-17 12:00:04 +04:00
* Copyright ( C ) I B M C o r p . 1 9 9 9 ,2 0 1 0
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 + 8
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 + 1 6
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 + 2 4
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 + 3 2
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 + 4 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 + 4 8
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 + 5 6
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 + 6 4
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 + 7 2
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 + 8 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 + 8 8
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 + 9 6
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 + 1 0 4
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 + 1 1 2
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 + 1 2 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
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
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 | \
2006-02-01 14:06:38 +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 _ S I N G L E _ S T E 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
# 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 )
2010-05-17 12:00:04 +04:00
.macro HANDLE_SIE_INTERCEPT
# if d e f i n e d ( C O N F I G _ K V M ) | | d e f i n e d ( C O N F I G _ K V M _ M O D U L E )
lg % r3 ,_ _ L C _ S I E _ H O O K
ltgr % r3 ,% r3
jz 0 f
basr % r14 ,% r3
2010-05-27 01:26:21 +04:00
0 :
2010-05-17 12:00:04 +04:00
# endif
.endm
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
2010-05-17 12:00:02 +04:00
basr % r2 ,% r0
brasl % r14 ,t r a c e _ h a r d i r q s _ o n _ c a l l e r
2006-07-03 11:24:46 +04:00
.endm
.macro TRACE_IRQS_OFF
2010-05-17 12:00:02 +04:00
basr % r2 ,% r0
brasl % r14 ,t r a c e _ h a r d i r q s _ o f f _ c a l l e r
2006-07-03 11:24:46 +04:00
.endm
2007-10-12 00:11:12 +04:00
2010-05-17 12:00:02 +04:00
.macro TRACE_IRQS_CHECK_ON
2007-11-20 13:13:32 +03:00
tm S P _ P S W ( % r15 ) ,0 x03 # i r q s e n a b l e d ?
jz 0 f
2010-05-17 12:00:02 +04:00
TRACE_ I R Q S _ O N
0 :
.endm
.macro TRACE_IRQS_CHECK_OFF
tm S P _ P S W ( % r15 ) ,0 x03 # i r q s e n a b l e d ?
jz 0 f
TRACE_ I R Q S _ O F F
0 :
2007-10-12 00:11:12 +04:00
.endm
2006-07-03 11:24:46 +04:00
# 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
2010-05-17 12:00:02 +04:00
# define T R A C E _ I R Q S _ C H E C K _ O N
# define T R A C E _ I R Q S _ C H E C K _ 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
brasl % r14 ,l o c k d e p _ s y s _ e x i t
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
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
lg % r10 ,\ l c _ f r o m
slg % r10 ,\ l c _ t o
alg % r10 ,\ l c _ s u m
stg % r10 ,\ l c _ s u m
.endm
/ *
* 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
* /
2007-07-10 13:24:18 +04:00
.macro SAVE_ALL_SVC psworg,s a v e a r e a
2010-05-17 12:00:05 +04:00
stmg % r11 ,% r15 ,\ s a v e a r e a
2007-07-10 13:24:18 +04:00
lg % 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
2010-05-17 12:00:05 +04:00
aghi % r15 ,- 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
lg % r11 ,_ _ L C _ L A S T _ B R E A K
2007-07-10 13:24:18 +04:00
.endm
2010-05-17 12:00:05 +04:00
.macro SAVE_ALL_PGM psworg,s a v e a r e a
stmg % r11 ,% r15 ,\ 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
2010-05-17 12:00:05 +04:00
jnz 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
jnz 2 f
la % r12 ,\ p s w o r g
j s t a c k _ o v e r f l o w
# else
jz 2 f
2006-06-29 16:58:05 +04:00
# endif
2010-05-17 12:00:05 +04:00
1 : lg % 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 : aghi % r15 ,- 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
larl % r13 ,s y s t e m _ c a l l
lg % r11 ,_ _ L C _ L A S T _ B R E A K
2006-06-29 16:58:05 +04:00
.endm
.macro SAVE_ALL_ASYNC psworg,s a v e a r e a
2010-05-17 12:00:05 +04:00
stmg % r11 ,% r15 ,\ s a v e a r e a
larl % r13 ,s y s t e m _ c a l l
lg % r11 ,_ _ L C _ L A S T _ B R E A K
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
jnz 1 f # f r o m u s e r - > l o a d k e r n e l s t a c k
clc \ p s w o r g + 8 ( 8 ) ,B A S E D ( . L c r i t i c a l _ e n d )
jhe 0 f
clc \ p s w o r g + 8 ( 8 ) ,B A S E D ( . L c r i t i c a l _ s t a r t )
jl 0 f
brasl % r14 ,c l e a n u p _ c r i t i c a l
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
jnz 1 f
0 : lg % 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 ?
slgr % r14 ,% r15
srag % r14 ,% 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
2010-05-17 12:00:05 +04:00
jnz 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
jnz 2 f
j s t a c k _ o v e r f l o w
# else
jz 2 f
2005-04-17 02:20:36 +04:00
# endif
2010-05-17 12:00:05 +04:00
1 : lg % r15 ,_ _ L C _ A S Y N C _ S T A C K # l o a d a s y n c s t a c k
2 : aghi % r15 ,- 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
2010-05-17 12:00:05 +04:00
.macro CREATE_STACK_FRAME savearea
xc _ _ S F _ B A C K C H A I N ( 8 ,% r15 ) ,_ _ S F _ B A C K C H A I N ( % r15 )
2005-04-17 02:20:36 +04:00
stg % 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
2010-05-17 12:00:05 +04:00
mvc S P _ R 1 1 ( 4 0 ,% r15 ) ,\ s a v e a r e a # m o v e % r 11 - % r15 t o s t a c k
stmg % r0 ,% r10 ,S P _ R 0 ( % r15 ) # s t o r e g p r s % r 0 - % r10 t o k e r n e l s t a c k
2006-09-28 18:56:37 +04:00
.endm
2005-04-17 02:20:36 +04:00
2005-09-04 02:57:56 +04:00
.macro RESTORE_ALL psworg,s y n c
mvc \ p s w o r g ( 1 6 ) ,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
2008-12-31 17:11:42 +03:00
lg % r14 ,_ _ L C _ V D S O _ P E R _ C P U
lmg % r0 ,% r13 ,S P _ R 0 ( % r15 ) # l o a d g p r s 0 - 1 3 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
2008-12-31 17:11:42 +03:00
mvc _ _ V D S O _ E C T G _ B A S E ( 1 6 ,% r14 ) ,_ _ L C _ E X I T _ T I M E R
lmg % r14 ,% r15 ,S P _ R 1 4 ( % r15 ) # l o a d g r p s 14 - 1 5 o f u s e r
2005-09-04 02:57:56 +04:00
lpswe \ 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-05-17 12:00:05 +04:00
.macro LAST_BREAK
srag % r10 ,% r11 ,2 3
jz 0 f
stg % r11 ,_ _ T I _ l a s t _ b r e a k ( % r12 )
0 :
.endm
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 :
tm _ _ T H R E A D _ p e r + 4 ( % r3 ) ,0 x e 8 # i s t h e n e w p r o c e s s u s i n g p e r ?
jz _ _ s w i t c h _ t o _ n o p e r # i f n o t w e ' r e f i n e
2006-09-28 18:56:37 +04:00
stctg % c9 ,% c11 ,_ _ S F _ E M P T Y ( % r15 ) # W e a r e u s i n g p e r s t u f f
clc _ _ T H R E A D _ p e r ( 2 4 ,% r3 ) ,_ _ S F _ E M P T Y ( % r15 )
je _ _ s w i t c h _ t o _ n o p e r # w e g o t a w a y w i t h o u t b a s h i n g T L B ' s
lctlg % c9 ,% c11 ,_ _ T H R E A D _ p e r ( % r3 ) # N o p e w e d i d n ' t
2005-04-17 02:20:36 +04:00
__switch_to_noper :
2006-09-28 18:56:37 +04:00
lg % 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
2005-06-26 01:55:30 +04:00
tm _ _ T I _ f l a g s + 7 ( % 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 ?
jz _ _ s w i t c h _ t o _ n o _ m c c k
ni _ _ T I _ f l a g s + 7 ( % 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
lg % r4 ,_ _ 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
oi _ _ T I _ f l a g s + 7 ( % r4 ) ,_ 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
__switch_to_no_mcck :
2006-09-28 18:56:37 +04:00
stmg % r6 ,% r15 ,_ _ S F _ G P R S ( % r15 ) # s t o r e _ _ s w i t c h _ t o r e g i s t e r s o f p r e v t a s k
2005-04-17 02:20:36 +04:00
stg % 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 t o p r e v - > t s s . k s p
lg % 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 f r o m n e x t - > t s s . k s p
2006-09-28 18:56:37 +04:00
lmg % r6 ,% r15 ,_ _ S F _ G P R S ( % r15 ) # l o a d _ _ s w i t c h _ t o r e g i s t e r s o f n e x t t a s k
2005-04-17 02:20:36 +04:00
stg % r3 ,_ _ L C _ C U R R E N T # _ _ L C _ C U R R E N T = c u r r e n t t a s k s t r u c 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
2006-09-28 18:56:37 +04:00
lg % r3 ,_ _ T H R E A D _ i n f o ( % r3 ) # l o a d t h r e a d _ i n f o f r o m t a s k s t r u c t
2005-04-17 02:20:36 +04:00
stg % r3 ,_ _ L C _ T H R E A D _ I N F O
aghi % r3 ,S T A C K _ S I Z E
stg % r3 ,_ _ L C _ K E R N E L _ S T A C K # _ _ L C _ K E R N E L _ S T A C K = n e w k e r n e l s t a c k
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
2010-05-17 12:00:05 +04: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 ( 1 6 ,% 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
stg % r7 ,S P _ A R G S ( % r15 )
lg % 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
2005-04-17 02:20:36 +04:00
sysc_do_svc :
2010-05-17 12:00:05 +04:00
llgh % r7 ,S P _ S V C N R ( % r15 )
slag % r7 ,% r7 ,2 # s h i f t a n d t e s t f o r s v c 0
2005-04-17 02:20:36 +04:00
jnz s y s c _ n r _ o k
# svc 0 : system c a l l n u m b e r i n % r1
2010-05-17 12:00:05 +04:00
llgfr % r1 ,% r1 # c l e a r h i g h w o r d i n r 1
cghi % r1 ,N R _ s y s c a l l s
2005-04-17 02:20:36 +04:00
jnl s y s c _ n r _ o k
2010-05-17 12:00:05 +04:00
sth % r1 ,S P _ S V C N R ( % r15 )
slag % r7 ,% r1 ,2 # s h i f t a n d t e s t f o r s v c 0
2005-04-17 02:20:36 +04:00
sysc_nr_ok :
2006-09-28 18:56:37 +04:00
larl % r10 ,s y s _ c a l l _ t a b l e
2006-01-06 11:19:28 +03:00
# ifdef C O N F I G _ C O M P A T
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 5 ( % r12 ) ,( _ T I F _ 3 1 B I T > > 1 6 ) # r u n n i n g i n 31 b i t m o d e ?
2005-09-04 02:58:04 +04:00
jno s y s c _ n o e m u
2006-09-28 18:56:37 +04:00
larl % r10 ,s y s _ c a l l _ t a b l e _ e m u # u s e 31 b i t e m u l a t i o n s y s t e m c a l l s
2005-04-17 02:20:36 +04:00
sysc_noemu :
# endif
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 6 ( % r12 ) ,_ T I F _ S Y S C A L L
2006-09-28 18:56:37 +04:00
lgf % r8 ,0 ( % r7 ,% r10 ) # l o a d a d d r e s s o f s y s t e m c a l l r o u t i n e
jnz 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
stg % 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 :
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ W O R K _ S V C
2006-09-28 18:56:37 +04:00
jnz 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 ?
jno 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 :
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ M C C K _ P E N D I N G
2005-06-26 01:55:30 +04:00
jo s y s c _ m c c k _ p e n d i n g
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ N E E D _ R E S C H E D
2005-04-17 02:20:36 +04:00
jo s y s c _ r e s c h e d u l e
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ S I G P E N D I N G
2010-05-17 12:00:01 +04:00
jo s y s c _ s i g p e n d i n g
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ N O T I F Y _ R E S U M E
2010-05-17 12:00:01 +04:00
jo s y s c _ n o t i f y _ r e s u m e
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ R E S T A R T _ S V C
2005-04-17 02:20:36 +04:00
jo s y s c _ r e s t a r t
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ S I N G L E _ S T E P
2005-04-17 02:20:36 +04:00
jo s y s c _ s i n g l e s t e p
2010-05-17 12:00:01 +04:00
j 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 :
2010-05-17 12:00:02 +04:00
larl % r14 ,s y s c _ r e t u r n
jg s c h e d u l e # r e t u r n p o i n t i s s y s c _ r e t u r n
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 :
2010-05-17 12:00:02 +04:00
larl % r14 ,s y s c _ r e t u r n
2006-09-28 18:56:37 +04:00
jg s39 0 _ h a n d l e _ m c c k # 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-06-26 01:55:30 +04:00
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 :
2010-05-17 12:00:05 +04:00
ni _ _ T I _ f l a g s + 7 ( % r12 ) ,2 5 5 - _ T I F _ S I N G L E _ S T E P # c l e a r T I F _ S I N G L E _ S T E 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
brasl % r14 ,d o _ s i g n a l # c a l l d o _ s i g n a l
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ R E S T A R T _ S V C
2005-04-17 02:20:36 +04:00
jo s y s c _ r e s t a r t
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ S I N G L E _ S T E P
2005-04-17 02:20:36 +04:00
jo s y s c _ s i n g l e s t e p
2010-05-17 12:00:02 +04:00
j 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
2010-05-17 12:00:02 +04:00
larl % r14 ,s y s c _ r e t u r n
2008-10-10 23:33:20 +04:00
jg d o _ n o t i f y _ r e s u m e # 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 :
2010-05-17 12:00:05 +04:00
ni _ _ T I _ f l a g s + 7 ( % 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
lg % 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 ( 8 ,% 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
lmg % r2 ,% r6 ,S P _ R 2 ( % r15 ) # l o a d s v c a r g u m e n t s
2010-05-17 12:00:05 +04:00
sth % r7 ,S P _ S V C N R ( % r15 )
slag % r7 ,% r7 ,2
j 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
#
# _ TIF_ S I N G L E _ S T E P i s s e t , c a l l d o _ s i n g l e _ s t e p
#
sysc_singlestep :
2010-05-17 12:00:05 +04:00
ni _ _ T I _ f l a g s + 7 ( % r12 ) ,2 5 5 - _ T I F _ S I N G L E _ S T E P # c l e a r T I F _ S I N G L E _ S T E P
2008-11-27 13:05:55 +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
2010-05-17 12:00:02 +04:00
larl % r14 ,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
2005-04-17 02:20:36 +04:00
jg d o _ s i n g l e _ s t e p # b r a n c h t o d o _ s i g t r a p
#
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 :
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
2010-05-17 12:00:05 +04:00
llgh % r0 ,S P _ S V C N R ( % r15 )
stg % r0 ,S P _ R 2 ( % r15 )
2008-10-10 23:33:20 +04:00
brasl % r14 ,d o _ s y s c a l l _ t r a c e _ e n t e r
2005-04-17 02:20:36 +04:00
lghi % r0 ,N R _ s y s c a l l s
2008-10-10 23:33:20 +04:00
clgr % r0 ,% r2
2005-04-17 02:20:36 +04:00
jnh s y s c _ t r a c e n o g o
2008-11-27 13:05:55 +03:00
sllg % r7 ,% r2 ,2 # s v c n u m b e r * 4
2005-04-17 02:20:36 +04:00
lgf % r8 ,0 ( % r7 ,% r10 )
sysc_tracego :
2006-09-28 18:56:37 +04:00
lmg % r3 ,% r6 ,S P _ R 3 ( % r15 )
lg % r2 ,S P _ O R I G _ R 2 ( % r15 )
basr % r14 ,% r8 # c a l l s y s _ x x x
stg % 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 :
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 6 ( % r12 ) ,_ T I F _ S Y S C A L L
2006-09-28 18:56:37 +04:00
jz s y s c _ r e t u r n
la % r2 ,S P _ P T R E G S ( % r15 ) # l o a d p t _ r e g s
larl % r14 ,s y s c _ r e t u r n # r e t u r n p o i n t i s s y s c _ r e t u r n
2008-10-10 23:33:20 +04:00
jg d o _ s y s c a l l _ t r a c e _ e x i t
2005-04-17 02:20:36 +04:00
#
# 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 :
lg % r13 ,_ _ L C _ S V C _ N E W _ P S W + 8
2010-05-17 12:00:05 +04:00
lg % 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 ?
jo 0 f
stg % 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 : brasl % r14 ,s c h e d u l e _ t a i l
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O N
2006-09-28 18:56:37 +04:00
stosm 2 4 ( % 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
j 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 :
stmg % r12 ,% r15 ,9 6 ( % r15 )
lgr % r14 ,% r15
aghi % r15 ,- S P _ S I Z E
stg % 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 )
lgr % r5 ,% r12
brasl % r14 ,d o _ e x e c v e
ltgfr % r2 ,% r2
je 0 f
aghi % r15 ,S P _ S I Z E
lmg % r12 ,% r15 ,9 6 ( % 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
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O F F
2007-04-27 18:01:40 +04:00
lg % r15 ,_ _ L C _ K E R N E L _ S T A C K # l o a d k s p
aghi % r15 ,- 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
lg % r13 ,_ _ L C _ S V C _ N E W _ P S W + 8
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
2010-05-17 12:00:05 +04:00
lg % 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 ( 8 ,% r15 ) ,_ _ S F _ B A C K C H A I N ( % r15 )
2010-05-17 12:00:02 +04:00
# TRACE_ I R Q S _ O N
2007-04-27 18:01:40 +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
brasl % r14 ,e x e c v e _ t a i l
j 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
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
jnz 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
2010-05-17 12:00:05 +04: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 ( 1 6 ,% r15 ) ,_ _ L C _ P G M _ O L D _ P S W
lg % 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 ?
jz 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
2005-04-17 02:20:36 +04:00
pgm_no_vtime :
2010-05-17 12:00:04 +04:00
HANDLE_ S I E _ I N T E R C E P T
2010-05-17 12:00:02 +04:00
TRACE_ I R Q S _ C H E C K _ O F F
2010-05-17 12:00:05 +04:00
stg % r11 ,S P _ A R G S ( % r15 )
2006-09-28 18:56:37 +04:00
lgf % 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
2005-04-17 02:20:36 +04:00
lghi % r8 ,0 x7 f
ngr % r8 ,% r3
pgm_do_call :
2006-09-28 18:56:37 +04:00
sll % r8 ,3
larl % r1 ,p g m _ c h e c k _ t a b l e
lg % 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
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-05-17 12:00:02 +04: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
pgm_exit :
TRACE_ I R Q S _ C H E C K _ O N
j 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
jnz 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 ( 1 6 ) ,_ _ L C _ S V C _ N E W _ P S W
je 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
lpswe _ _ L C _ P G M _ O L D _ P S W
2005-04-17 02:20:36 +04:00
#
# Normal p e r e x c e p t i o n
#
pgm_per_std :
2010-05-17 12:00:05 +04: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 ( 1 6 ,% r15 ) ,_ _ L C _ P G M _ O L D _ P S W
lg % 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 ?
jz 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
2005-04-17 02:20:36 +04:00
pgm_no_vtime2 :
2010-05-17 12:00:04 +04:00
HANDLE_ S I E _ I N T E R C E P T
2010-05-17 12:00:02 +04:00
TRACE_ I R Q S _ C H E C K _ O F F
2010-05-17 12:00:05 +04:00
lg % r1 ,_ _ T I _ t a s k ( % r12 )
2006-09-20 17:58:39 +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 ?
jz k e r n e l _ p e r
2005-04-17 02:20:36 +04:00
mvc _ _ T H R E A D _ p e r + _ _ P E R _ a t m i d ( 2 ,% r1 ) ,_ _ L C _ P E R _ A T M I D
mvc _ _ T H R E A D _ p e r + _ _ P E R _ a d d r e s s ( 8 ,% r1 ) ,_ _ L C _ P E R _ A D D R E S S
mvc _ _ T H R E A D _ p e r + _ _ P E R _ a c c e s s _ i d ( 1 ,% r1 ) ,_ _ L C _ P E R _ A C C E S S _ I D
2010-05-17 12:00:05 +04:00
oi _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ S I N G L E _ S T E P # s e t T I F _ S I N G L E _ S T E P
2006-09-28 18:56:37 +04:00
lgf % 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
2005-04-17 02:20:36 +04:00
lghi % r8 ,0 x7 f
2006-09-28 18:56:37 +04:00
ngr % 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-05-17 12:00:02 +04:00
je p g m _ e x i t
2005-04-17 02:20:36 +04:00
j p g m _ d o _ c a l l
#
# 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 :
2010-05-17 12:00:05 +04: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 ( 1 6 ,% 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
lg % 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
2010-05-17 12:00:02 +04:00
TRACE_ I R Q S _ O F F
2010-05-17 12:00:05 +04:00
lg % r8 ,_ _ T I _ t a s k ( % r12 )
2009-11-13 17:43:54 +03:00
mvc _ _ T H R E A D _ p e r + _ _ P E R _ a t m i d ( 2 ,% r8 ) ,_ _ L C _ P E R _ A T M I D
mvc _ _ T H R E A D _ p e r + _ _ P E R _ a d d r e s s ( 8 ,% r8 ) ,_ _ L C _ P E R _ A D D R E S S
mvc _ _ T H R E A D _ p e r + _ _ P E R _ a c c e s s _ i d ( 1 ,% r8 ) ,_ _ L C _ P E R _ A C C E S S _ I D
2010-05-17 12:00:05 +04:00
oi _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ S I N G L E _ S T E P # s e t T I F _ S I N G L E _ S T E P
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O N
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
lmg % 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
j 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 :
2008-11-27 13:05:55 +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
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
2010-05-17 12:00:02 +04:00
brasl % r14 ,d o _ s i n g l e _ s t e p
j 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
2010-05-17 12:00: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 + 4 0
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A + 4 0
mvc S P _ P S W ( 1 6 ,% r15 ) ,0 ( % r12 ) # m o v e u s e r P S W t o s t a c k
lg % 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 ?
jz 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
2005-04-17 02:20:36 +04:00
io_no_vtime :
2010-05-17 12:00:04 +04:00
HANDLE_ S I E _ I N T E R C E P T
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
brasl % r14 ,d o _ I R Q # c a l l 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 :
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ W O R K _ I N T
2006-09-28 18:56:37 +04:00
jnz 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 k v m i s e n a b l e d c h e c k i f w e n e e d t o
# modify t h e p s w t o l e a v e S I E
# 3 ) 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
jo 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
2010-05-17 12:00:05 +04:00
icm % r0 ,1 5 ,_ _ T I _ p r e c o u n t ( % r12 )
2008-05-07 11:22:52 +04:00
jnz i o _ r e s t o r e # p r e e m p t i o n i s d i s a b l e d
2010-05-17 12:00:02 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ N E E D _ R E S C H E D
jno i o _ r e s t o r e
2005-04-17 02:20:36 +04:00
# switch t o k e r n e l s t a c k
lg % r1 ,S P _ R 1 5 ( % r15 )
aghi % r1 ,- 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 ( 8 ,% 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
lgr % 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
brasl % r14 ,p r e e m p t _ s c h e d u l e _ i r q
j i o _ r e t u r n
# else
2010-05-17 12:00:01 +04:00
j 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
lg % r1 ,_ _ L C _ K E R N E L _ S T A C K
aghi % r1 ,- 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 ( 8 ,% 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
lgr % r15 ,% r1
2010-05-17 12:00:01 +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-02-01 14:06:38 +03: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 :
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ M C C K _ P E N D I N G
2005-06-26 01:55:30 +04:00
jo i o _ m c c k _ p e n d i n g
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ N E E D _ R E S C H E D
2005-04-17 02:20:36 +04:00
jo i o _ r e s c h e d u l e
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ S I G P E N D I N G
2010-05-17 12:00:01 +04:00
jo i o _ s i g p e n d i n g
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ N O T I F Y _ R E S U M E
2010-05-17 12:00:01 +04:00
jo i o _ n o t i f y _ r e s u m e
j 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
2008-05-07 11:22:53 +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
2007-07-27 14:29:18 +04:00
brasl % r14 ,s39 0 _ h a n d l e _ m c c k # 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
j 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
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
brasl % r14 ,s c h e d u l e # 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
j 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 o r 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
2005-04-17 02:20:36 +04:00
brasl % r14 ,d o _ s i g n a l # c a l l d o _ s i g n a l
2006-09-28 18:56:37 +04:00
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
j 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_ N O T I F Y _ R E S U M E o r i s s e t , c a l l d o _ n o t i f y _ r e s u m e
#
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
brasl % r14 ,d o _ n o t i f y _ r e s u m e # c a l l d o _ n o t i f y _ r e s u m e
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
j 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
2010-05-17 12:00: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 + 4 0
CREATE_ S T A C K _ F R A M E _ _ L C _ S A V E _ A R E A + 4 0
mvc S P _ P S W ( 1 6 ,% r15 ) ,0 ( % r12 ) # m o v e u s e r P S W t o s t a c k
lg % 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 ?
jz 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
2005-04-17 02:20:36 +04:00
ext_no_vtime :
2010-05-17 12:00:04 +04:00
HANDLE_ S I E _ I N T E R C E P T
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
llgh % r3 ,_ _ L C _ E X T _ I N T _ C O D E # g e t i n t e r r u p t i o n c o d e
brasl % r14 ,d o _ e x t i n t
2005-04-17 02:20:36 +04:00
j 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
la % r1 ,4 0 9 5 # r e v a l i d a t e r 1
spt _ _ L C _ C P U _ T I M E R _ S A V E _ A R E A - 4 0 9 5 ( % r1 ) # r e v a l i d a t e c p u t i m e r
2006-09-28 18:56:37 +04:00
lmg % r0 ,% r15 ,_ _ L C _ G P R E G S _ S A V E _ A R E A - 4 0 9 5 ( % r1 ) # r e v a l i d a t e g p r s
2010-05-17 12:00:05 +04:00
stmg % r11 ,% r15 ,_ _ L C _ S A V E _ A R E A + 8 0
larl % r13 ,s y s t e m _ c a l l
lg % r11 ,_ _ L C _ L A S T _ B R E A K
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
jo 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
2006-06-29 16:58:05 +04:00
la % r14 ,4 0 9 5
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 - 4 0 9 5 ( % r14 )
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 ?
jo 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
jl 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
jl 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
jl 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
jno 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
2006-09-28 18:56:37 +04:00
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
2005-06-26 01:55:30 +04:00
jnz m c c k _ i n t _ m a i n # f r o m u s e r - > l o a d k e r n e l s t a c k
clc _ _ L C _ M C K _ O L D _ P S W + 8 ( 8 ) ,B A S E D ( . L c r i t i c a l _ e n d )
jhe m c c k _ i n t _ m a i n
2006-09-28 18:56:37 +04:00
clc _ _ L C _ M C K _ O L D _ P S W + 8 ( 8 ) ,B A S E D ( . L c r i t i c a l _ s t a r t )
2005-06-26 01:55:30 +04:00
jl m c c k _ i n t _ m a i n
2006-09-28 18:56:37 +04:00
brasl % r14 ,c l e a n u p _ c r i t i c a l
2005-06-26 01:55:30 +04:00
mcck_int_main :
2006-09-28 18:56:37 +04:00
lg % 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 ?
2005-06-26 01:55:30 +04:00
slgr % r14 ,% r15
srag % r14 ,% r14 ,P A G E _ S H I F T
jz 0 f
2006-09-28 18:56:37 +04:00
lg % 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
2010-05-17 12:00:05 +04:00
0 : aghi % r15 ,- 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 + 8 0
mvc S P _ P S W ( 1 6 ,% r15 ) ,0 ( % r12 )
lg % 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-09-04 02:57:56 +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 ?
jno m c c k _ n o _ v t i m e # n o - > n o t i m e r u p d a t e
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
jz 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
2010-05-17 12:00:05 +04:00
LAST_ B R E A K
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
brasl % r14 ,s39 0 _ d o _ m a c h i n e _ c h e c k
2006-09-28 18:56:37 +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 ?
2005-06-26 01:55:30 +04:00
jno m c c k _ r e t u r n
lg % 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
aghi % r1 ,- 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 )
xc _ _ S F _ B A C K C H A I N ( 8 ,% 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
lgr % r15 ,% r1
stosm _ _ S F _ E M P T Y ( % r15 ) ,0 x04 # t u r n d a t o n
2010-05-17 12:00:05 +04:00
tm _ _ T I _ f l a g s + 7 ( % r12 ) ,_ T I F _ M C C K _ P E N D I N G
2005-06-26 01:55:30 +04:00
jno m c c k _ r e t u r n
2010-05-17 12:00:04 +04:00
HANDLE_ S I E _ I N T E R C E P T
2006-07-03 11:24:46 +04:00
TRACE_ I R Q S _ O F F
2005-06-26 01:55:30 +04:00
brasl % r14 ,s39 0 _ h a n d l e _ m c c k
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 ( 1 6 ) ,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
lmg % r0 ,% r15 ,S P _ R 0 ( % r15 ) # l o a d g p r s 0 - 1 5
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 ?
jno 0 f
stpt _ _ L C _ E X I T _ T I M E R
2008-12-25 15:39:25 +03:00
0 : lpswe _ _ 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
2010-05-17 12:00:05 +04:00
mcck_done :
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
lg % r15 ,_ _ L C _ S A V E _ A R E A + 1 2 0 # l o a d k s p
lghi % r10 ,_ _ L C _ C R E G S _ S A V E _ A R E A
lctlg % c0 ,% c15 ,0 ( % r10 ) # g e t n e w c t l r e g s
lghi % r10 ,_ _ L C _ A R E G S _ S A V E _ A R E A
lam % a0 ,% a15 ,0 ( % r10 )
lmg % 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
lg % 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
jg s t a r t _ s e c o n d a r y
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
lpswe 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 ,0 x00 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
restart_go :
# endif
# 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 :
lg % 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
2006-09-20 17:59:22 +04:00
aghi % r15 ,- S P _ S I Z E
2005-04-17 02:20:36 +04:00
mvc S P _ P S W ( 1 6 ,% r15 ) ,0 ( % r12 ) # m o v e u s e r P S W t o s t a c k
2010-05-17 12:00:05 +04:00
stmg % r0 ,% r10 ,S P _ R 0 ( % r15 ) # s t o r e g p r s % r 0 - % r10 t o k e r n e l s t a c k
2005-04-17 02:20:36 +04:00
la % r1 ,_ _ L C _ S A V E _ A R E A
chi % r12 ,_ _ L C _ S V C _ O L D _ P S W
je 0 f
chi % r12 ,_ _ L C _ P G M _ O L D _ P S W
je 0 f
2010-05-17 12:00:05 +04:00
la % r1 ,_ _ L C _ S A V E _ A R E A + 4 0
0 : mvc S P _ R 1 1 ( 4 0 ,% r15 ) ,0 ( % r1 ) # m o v e % r 11 - % r15 t o s t a c k
[S390] kernel: show last breaking-event-address on oops
Newer s390 models have a breaking-event-address-recording register.
Each time an instruction causes a break in the sequential instruction
execution, the address is saved in that hardware register. On a program
interrupt the address is copied to the lowcore address 272-279, which
makes it software accessible.
This patch changes the program check handler and the stack overflow
checker to copy the value into the pt_regs argument.
The oops output is enhanced to show the last known breaking address.
It might give additional information if the stack trace is corrupted.
The feature is only available on 64 bit.
The new oops output looks like:
[---------snip----------]
Modules linked in: vmcp sunrpc qeth_l2 dm_mod qeth ccwgroup
CPU: 2 Not tainted 2.6.24zlive-host #8
Process modprobe (pid: 4788, task: 00000000bf3d8718, ksp: 00000000b2b0b8e0)
Krnl PSW : 0704200180000000 000003e000020028 (vmcp_init+0x28/0xe4 [vmcp])
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: 0000000004000002 000003e000020000 0000000000000000 0000000000000001
000000000015734c ffffffffffffffff 000003e0000b3b00 0000000000000000
000003e00007ca30 00000000b5bb5d40 00000000b5bb5800 000003e0000b3b00
000003e0000a2000 00000000003ecf50 00000000b2b0bd50 00000000b2b0bcb0
Krnl Code: 000003e000020018: c0c000040ff4 larl %r12,3e0000a2000
000003e00002001e: e3e0f0000024 stg %r14,0(%r15)
000003e000020024: a7f40001 brc 15,3e000020026
>000003e000020028: e310c0100004 lg %r1,16(%r12)
000003e00002002e: c020000413dc larl %r2,3e0000a27e6
000003e000020034: c0a00004aee6 larl %r10,3e0000b5e00
000003e00002003a: a7490001 lghi %r4,1
000003e00002003e: a75900f0 lghi %r5,240
Call Trace:
([<000000000014b300>] blocking_notifier_call_chain+0x2c/0x40)
[<000000000015735c>] sys_init_module+0x19d8/0x1b08
[<0000000000110afc>] sysc_noemu+0x10/0x16
[<000002000011cda2>] 0x2000011cda2
Last Breaking-Event-Address:
[<000003e000020024>] vmcp_init+0x24/0xe4 [vmcp]
[---------snip----------]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-04-17 09:46:30 +04:00
mvc S P _ A R G S ( 8 ,% r15 ) ,_ _ L C _ L A S T _ B R E A K
2006-09-28 18:56:37 +04:00
xc _ _ S F _ B A C K C H A I N ( 8 ,% 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
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
jg k e r n e l _ s t a c k _ o v e r f l o w
# endif
cleanup_table_system_call :
.quad system_ c a l l , s y s c _ d o _ s v c
2010-05-17 12:00:02 +04:00
cleanup_table_sysc_tif :
.quad sysc_ t i f , s y s c _ r e s t o r e
cleanup_table_sysc_restore :
.quad sysc_ r e s t o r e , s y s c _ d o n e
cleanup_table_io_tif :
.quad io_ t i f , i o _ r e s t o r e
cleanup_table_io_restore :
.quad io_ r e s t o r e , i o _ d o n e
2005-04-17 02:20:36 +04:00
cleanup_critical :
clc 8 ( 8 ,% 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 )
jl 0 f
clc 8 ( 8 ,% 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 + 8 )
jl 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 8 ( 8 ,% 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
jl 0 f
2010-05-17 12:00:02 +04:00
clc 8 ( 8 ,% 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 + 8 )
jl 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 8 ( 8 ,% 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
jl 0 f
2010-05-17 12:00:02 +04:00
clc 8 ( 8 ,% 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 + 8 )
jl 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 8 ( 8 ,% 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
jl 0 f
2010-05-17 12:00:02 +04:00
clc 8 ( 8 ,% r12 ) ,B A S E D ( c l e a n u p _ t a b l e _ i o _ t i f + 8 )
jl 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 8 ( 8 ,% 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
jl 0 f
2010-05-17 12:00:02 +04:00
clc 8 ( 8 ,% 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 + 8 )
jl 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 ( 1 6 ) ,0 ( % r12 )
clc _ _ L C _ R E T U R N _ P S W + 8 ( 8 ) ,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 )
jh 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
cghi % r12 ,_ _ L C _ M C K _ O L D _ P S W
je 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 : cghi % r12 ,_ _ L C _ M C K _ O L D _ P S W
2010-05-17 12:00:05 +04:00
la % r12 ,_ _ L C _ S A V E _ A R E A + 8 0
2010-05-17 12:00:03 +04:00
je 0 f
2010-05-17 12:00:05 +04:00
la % r12 ,_ _ L C _ S A V E _ A R E A + 4 0
2005-04-17 02:20:36 +04:00
0 : clc _ _ L C _ R E T U R N _ P S W + 8 ( 8 ) ,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 )
jhe c l e a n u p _ v t i m e
clc _ _ L C _ R E T U R N _ P S W + 8 ( 8 ) ,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 )
jh 0 f
2010-05-17 12:00:05 +04:00
mvc _ _ L C _ S A V E _ A R E A ( 4 0 ) ,0 ( % r12 )
0 : lg % 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
aghi % r15 ,- 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
stg % r15 ,3 2 ( % r12 )
stg % r11 ,0 ( % r12 )
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 ( 1 6 ,% 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
stg % r7 ,S P _ A R G S ( % r15 )
mvc 8 ( 8 ,% 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 + 8 ( 8 ) ,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 + 2 4 )
jhe 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 + 8 ( 8 ) ,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 + 3 2 )
jh 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
2010-05-17 12:00:05 +04:00
srag % r12 ,% r11 ,2 3
lg % r12 ,_ _ L C _ T H R E A D _ I N F O
jz 0 f
stg % r11 ,_ _ T I _ l a s t _ b r e a k ( % r12 )
0 : mvc _ _ L C _ R E T U R N _ P S W + 8 ( 8 ) ,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 + 8 )
2005-04-17 02:20:36 +04:00
la % r12 ,_ _ L C _ R E T U R N _ P S W
br % r14
cleanup_system_call_insn :
.quad sysc_saveall
2006-09-28 18:56:37 +04:00
.quad system_call
.quad sysc_vtime
.quad sysc_stime
.quad sysc_update
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 ( 8 ) ,0 ( % r12 )
2010-05-17 12:00:02 +04:00
mvc _ _ L C _ R E T U R N _ P S W + 8 ( 8 ) ,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 8 ( 8 ,% 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 )
2010-05-17 12:00:03 +04:00
je 2 f
2010-05-17 12:00:02 +04:00
clc 8 ( 8 ,% 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 + 8 )
2008-12-31 17:11:42 +03:00
jhe 0 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
cghi % r12 ,_ _ L C _ M C K _ O L D _ P S W
je 0 f
2008-12-31 17:11:42 +03: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
0 : mvc _ _ L C _ R E T U R N _ P S W ( 1 6 ) ,S P _ P S W ( % r15 )
2005-09-04 02:57:56 +04:00
cghi % r12 ,_ _ L C _ M C K _ O L D _ P S W
2010-05-17 12:00:05 +04:00
la % r12 ,_ _ L C _ S A V E _ A R E A + 8 0
2010-05-17 12:00:03 +04:00
je 1 f
2010-05-17 12:00:05 +04:00
la % r12 ,_ _ L C _ S A V E _ A R E A + 4 0
1 : mvc 0 ( 4 0 ,% r12 ) ,S P _ R 1 1 ( % r15 )
lmg % r0 ,% r10 ,S P _ R 0 ( % r15 )
2005-04-17 02:20:36 +04:00
lg % r15 ,S P _ R 1 5 ( % r15 )
2010-05-17 12:00:03 +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
.quad sysc_done - 4
2008-12-31 17:11:42 +03:00
.quad sysc_done - 1 6
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 ( 8 ) ,0 ( % r12 )
2010-05-17 12:00:02 +04:00
mvc _ _ L C _ R E T U R N _ P S W + 8 ( 8 ) ,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 8 ( 8 ,% 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
je 1 f
2010-05-17 12:00:02 +04:00
clc 8 ( 8 ,% 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 + 8 )
2008-12-31 17:11:42 +03:00
jhe 0 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
2008-12-31 17:11:42 +03:00
0 : mvc _ _ L C _ R E T U R N _ P S W ( 1 6 ) ,S P _ P S W ( % r15 )
2010-05-17 12:00:05 +04:00
mvc _ _ L C _ S A V E _ A R E A + 8 0 ( 4 0 ) ,S P _ R 1 1 ( % r15 )
lmg % r0 ,% r10 ,S P _ R 0 ( % r15 )
2005-09-04 02:57:56 +04:00
lg % 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
.quad io_done - 4
2008-12-31 17:11:42 +03:00
.quad io_done - 1 6
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
2005-04-17 02:20:36 +04:00
.Lcritical_start :
2006-09-28 18:56:37 +04:00
.quad __critical_start
2005-04-17 02:20:36 +04:00
.Lcritical_end :
2006-09-28 18:56:37 +04:00
.quad __critical_end
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 m e
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
2006-01-06 11:19:28 +03:00
# ifdef C O N F I G _ C O M P A T
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 m u
sys_call_table_emu :
# include " s y s c a l l s . S "
# undef S Y S C A L L
# endif