5 #include "arch_watchdog.h"
7 extern int watchdog_enabled
; /* if set to non-zero the watch dog is enabled */
8 extern unsigned watchdog_local_timer_ticks
; /* is timer still ticking? */
11 * as the implementation is not only architecture dependent but like in x86 case
12 * very much model specific, we need to keep a collection of methods that
13 * implement it in runtime after the correct arch/model was detected
16 typedef void (* arch_watchdog_method_t
)(int);
18 struct arch_watchdog
{
19 arch_watchdog_method_t init
; /* initial setup */
20 arch_watchdog_method_t reinit
; /* reinitialization after a tick */
24 extern struct arch_watchdog
*watchdog
;
26 /* let the arch code do whatever it needs to setup the watchdog */
27 int arch_watchdog_init(void);
28 /* if the watchdog detects lockup, let the arch code to handle it */
29 void arch_watchdog_lockup(const struct nmi_frame
* frame
);
31 /* generic NMI handler. Takes one agument which points to where the arch
32 * specific low level handler dumped CPU information and can be inspected by the
33 * arch specific code of the watchdog implementaion */
34 void nmi_watchdog_handler(struct nmi_frame
* frame
);
36 #endif /* __WATCHDOG_H__ */