The change adds a simple watchdog pretimeout framework infrastructure, its purpose is to allow users to select a desired handling of watchdog pretimeout events, which may be generated by a watchdog driver. The idea of adding this kind of a framework appeared after reviewing several attempts to add hardcoded pretimeout event handling to some watchdog driver and after a discussion with Guenter, see https://lkml.org/lkml/2015/11/4/346 By design every watchdog pretimeout governor may be compiled as a kernel module, a user selects a default watchdog pretimeout governor during compilation stage and can select another governor in runtime. Watchdogs with WDIOF_PRETIMEOUT capability now have two device attributes in sysfs: read/write pretimeout_governor attribute and read only pretimeout_available_governors attribute. To throw a pretimeout event for further processing a watchdog driver should call exported watchdog_notify_pretimeout(wdd) interface. In addition to the framework a number of simple watchdog pretimeout governors are added for review. Vladimir Zapolskiy (6): watchdog: add watchdog pretimeout framework watchdog: pretimeout: add noop pretimeout governor watchdog: pretimeout: add panic pretimeout governor watchdog: pretimeout: add userspace notifier pretimeout governor watchdog: pretimeout: add device specific notifier pretimeout governor watchdog: pretimeout: add ping pretimeout governor drivers/watchdog/Kconfig | 91 +++++++++ drivers/watchdog/Makefile | 10 +- drivers/watchdog/pretimeout_device.c | 49 +++++ drivers/watchdog/pretimeout_noop.c | 49 +++++ drivers/watchdog/pretimeout_panic.c | 49 +++++ drivers/watchdog/pretimeout_ping.c | 48 +++++ drivers/watchdog/pretimeout_userspace.c | 49 +++++ drivers/watchdog/watchdog_core.c | 14 +- drivers/watchdog/watchdog_pretimeout.c | 348 ++++++++++++++++++++++++++++++++ drivers/watchdog/watchdog_pretimeout.h | 31 +++ include/linux/watchdog.h | 12 ++ 11 files changed, 747 insertions(+), 3 deletions(-) create mode 100644 drivers/watchdog/pretimeout_device.c create mode 100644 drivers/watchdog/pretimeout_noop.c create mode 100644 drivers/watchdog/pretimeout_panic.c create mode 100644 drivers/watchdog/pretimeout_ping.c create mode 100644 drivers/watchdog/pretimeout_userspace.c create mode 100644 drivers/watchdog/watchdog_pretimeout.c create mode 100644 drivers/watchdog/watchdog_pretimeout.h -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html