#define DRV_NAME …
#include <linux/bug.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/hrtimer.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>
#include <xen/xen.h>
#include <asm/xen/hypercall.h>
#include <xen/interface/sched.h>
static struct platform_device *platform_device;
static struct sched_watchdog wdt;
static time64_t wdt_expires;
#define WATCHDOG_TIMEOUT …
static unsigned int timeout;
module_param(timeout, uint, S_IRUGO);
MODULE_PARM_DESC(…) …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, S_IRUGO);
MODULE_PARM_DESC(…) …;
static inline time64_t set_timeout(struct watchdog_device *wdd)
{ … }
static int xen_wdt_start(struct watchdog_device *wdd)
{ … }
static int xen_wdt_stop(struct watchdog_device *wdd)
{ … }
static int xen_wdt_kick(struct watchdog_device *wdd)
{ … }
static unsigned int xen_wdt_get_timeleft(struct watchdog_device *wdd)
{ … }
static struct watchdog_info xen_wdt_info = …;
static const struct watchdog_ops xen_wdt_ops = …;
static struct watchdog_device xen_wdt_dev = …;
static int xen_wdt_probe(struct platform_device *pdev)
{ … }
static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state)
{ … }
static int xen_wdt_resume(struct platform_device *dev)
{ … }
static struct platform_driver xen_wdt_driver = …;
static int __init xen_wdt_init_module(void)
{ … }
static void __exit xen_wdt_cleanup_module(void)
{ … }
module_init(…) …;
module_exit(xen_wdt_cleanup_module);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;