2008-02-08 04:19:31 -08:00
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# MN1 0 3 0 0 W a t c h d o g i n t e r r u p t h a n d l e r
#
# Copyright ( C ) 2 0 0 7 R e d H a t , I n c . A l l R i g h t s R e s e r v e d .
# Written b y D a v i d H o w e l l s ( d h o w e l l s @redhat.com)
#
# This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or
# modify i t u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n c e
# as p u b l i s h e d b y t h e F r e e S o f t w a r e F o u n d a t i o n ; either version
# 2 of t h e L i c e n c e , o r ( a t y o u r o p t i o n ) a n y l a t e r v e r s i o n .
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# include < l i n u x / s y s . h >
# include < l i n u x / l i n k a g e . h >
# include < a s m / i n t c t l - r e g s . h >
# include < a s m / t i m e r - r e g s . h >
# include < a s m / f r a m e . i n c >
2010-10-27 17:28:55 +01:00
# include < l i n u x / t h r e a d s . h >
2008-02-08 04:19:31 -08:00
.text
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Watchdog h a n d l e r e n t r y p o i n t
# - special n o n - m a s k a b l e i n t e r r u p t
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl watchdog_handler
.type watchdog_ h a n d l e r ,@function
watchdog_handler :
add - 4 ,s p
SAVE_ A L L
mov 0 x f f f f f f f f ,d0
mov d0 ,( R E G _ O R I G _ D 0 ,f p )
mov f p ,d0
lsr 2 ,d1
call w a t c h d o g _ i n t e r r u p t [ ] ,0 # w a t c h d o g _ i n t e r r u p t ( r e g s , i r q )
jmp r e t _ f r o m _ i n t r
.size watchdog_ h a n d l e r ,. - w a t c h d o g _ h a n d l e r
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Watchdog t o u c h e n t r y p o i n t
# - kept t o a b s o l u t e m i n i m u m ( u n f o r t u n a t e l y , i t ' s p r o t o t y p e d i n l i n u x / n m i . h s o
# we c a n ' t i n l i n e i t )
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl touch_nmi_watchdog
.type touch_ n m i _ w a t c h d o g ,@function
touch_nmi_watchdog :
clr d0
2010-10-27 17:28:55 +01:00
clr d1
mov w a t c h d o g _ a l e r t _ c o u n t e r , a0
setlb
mov d0 , ( a0 + )
inc d1
cmp N R _ C P U S , d1
lne
2008-02-08 04:19:31 -08:00
ret [ ] ,0
.size touch_ n m i _ w a t c h d o g ,. - t o u c h _ n m i _ w a t c h d o g