Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / watchdog / pretimeout_panic.c
blob2cc3c41d2be5b8a85b958dec24edb9818f2d9984
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2015-2016 Mentor Graphics
4 */
6 #include <linux/kernel.h>
7 #include <linux/module.h>
8 #include <linux/watchdog.h>
10 #include "watchdog_pretimeout.h"
12 /**
13 * pretimeout_panic - Panic on watchdog pretimeout event
14 * @wdd - watchdog_device
16 * Panic, watchdog has not been fed till pretimeout event.
18 static void pretimeout_panic(struct watchdog_device *wdd)
20 panic("watchdog pretimeout event\n");
23 static struct watchdog_governor watchdog_gov_panic = {
24 .name = "panic",
25 .pretimeout = pretimeout_panic,
28 static int __init watchdog_gov_panic_register(void)
30 return watchdog_register_governor(&watchdog_gov_panic);
33 static void __exit watchdog_gov_panic_unregister(void)
35 watchdog_unregister_governor(&watchdog_gov_panic);
37 module_init(watchdog_gov_panic_register);
38 module_exit(watchdog_gov_panic_unregister);
40 MODULE_AUTHOR("Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>");
41 MODULE_DESCRIPTION("Panic watchdog pretimeout governor");
42 MODULE_LICENSE("GPL");