From e05b59fe7927bc648ac3af3d59dc64a7ee6b22e2 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Wed, 19 Apr 2006 22:40:53 +0200 Subject: [WATCHDOG] Pre-Timeout flags Some watchdog timers support the concept of a "pretimeout" which occurs some time before the real timeout. The pretimeout can be delivered via an interrupt or NMI and can be used to panic the system when it occurs (so you get useful information instead of a blind reboot). Signed-off-by: Corey Minyard Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton --- include/linux/watchdog.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 1192ed8..a99c937 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h @@ -28,6 +28,8 @@ struct watchdog_info { #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) +#define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int) +#define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int) #define WDIOF_UNKNOWN -1 /* Unknown flag error */ #define WDIOS_UNKNOWN -1 /* Unknown status error */ @@ -41,6 +43,7 @@ struct watchdog_info { #define WDIOF_POWEROVER 0x0040 /* Power over voltage */ #define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ #define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ +#define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */ #define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ #define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ -- cgit v1.1 From 58b519f3e5e491d5a3e320dc525f58ac439bdde4 Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Sun, 21 May 2006 12:48:44 +0200 Subject: [WATCHDOG] add WDIOC_GETTIMELEFT ioctl Some watchdog drivers have the ability to report the remaining time before the system will reboot. With the WDIOC_GETTIMELEFT ioctl you can now read the time left before the watchdog would reboot your system. The following drivers support this new IOCTL: i8xx_tco.c, pcwd_pci.c and pcwd_usb.c . Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton --- include/linux/watchdog.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index a99c937..011bcfe 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h @@ -30,6 +30,7 @@ struct watchdog_info { #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) #define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int) #define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int) +#define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int) #define WDIOF_UNKNOWN -1 /* Unknown flag error */ #define WDIOS_UNKNOWN -1 /* Unknown status error */ @@ -40,9 +41,9 @@ struct watchdog_info { #define WDIOF_EXTERN2 0x0008 /* External relay 2 */ #define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ #define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ -#define WDIOF_POWEROVER 0x0040 /* Power over voltage */ -#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ -#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ +#define WDIOF_POWEROVER 0x0040 /* Power over voltage */ +#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ +#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ #define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */ #define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ -- cgit v1.1