#define pr_fmt(fmt) …
#include <linux/device.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#ifdef CONFIG_HPWDT_NMI_DECODING
#include <asm/nmi.h>
#endif
#include <linux/crash_dump.h>
#define HPWDT_VERSION …
#define SECS_TO_TICKS(secs) …
#define TICKS_TO_SECS(ticks) …
#define HPWDT_MAX_TICKS …
#define HPWDT_MAX_TIMER …
#define DEFAULT_MARGIN …
#define PRETIMEOUT_SEC …
static unsigned int soft_margin = …;
static bool nowayout = … WATCHDOG_NOWAYOUT;
static bool pretimeout = … IS_ENABLED(…);
static int kdumptimeout = …;
static void __iomem *pci_mem_addr;
static unsigned long __iomem *hpwdt_nmistat;
static unsigned long __iomem *hpwdt_timer_reg;
static unsigned long __iomem *hpwdt_timer_con;
static const struct pci_device_id hpwdt_devices[] = …;
MODULE_DEVICE_TABLE(pci, hpwdt_devices);
static const struct pci_device_id hpwdt_blacklist[] = …;
static struct watchdog_device hpwdt_dev;
static int hpwdt_hw_is_running(void)
{ … }
static int hpwdt_start(struct watchdog_device *wdd)
{ … }
static void hpwdt_stop(void)
{ … }
static int hpwdt_stop_core(struct watchdog_device *wdd)
{ … }
static void hpwdt_ping_ticks(int val)
{ … }
static int hpwdt_ping(struct watchdog_device *wdd)
{ … }
static unsigned int hpwdt_gettimeleft(struct watchdog_device *wdd)
{ … }
static int hpwdt_settimeout(struct watchdog_device *wdd, unsigned int val)
{ … }
#ifdef CONFIG_HPWDT_NMI_DECODING
static int hpwdt_set_pretimeout(struct watchdog_device *wdd, unsigned int req)
{ … }
static int hpwdt_my_nmi(void)
{ … }
static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
{ … }
#endif
static const struct watchdog_info ident = …;
static const struct watchdog_ops hpwdt_ops = …;
static struct watchdog_device hpwdt_dev = …;
static int hpwdt_init_nmi_decoding(struct pci_dev *dev)
{ … }
static void hpwdt_exit_nmi_decoding(void)
{ … }
static int hpwdt_init_one(struct pci_dev *dev,
const struct pci_device_id *ent)
{ … }
static void hpwdt_exit(struct pci_dev *dev)
{ … }
static int hpwdt_suspend(struct device *dev)
{ … }
static int hpwdt_resume(struct device *dev)
{ … }
static const struct dev_pm_ops hpwdt_pm_ops = …;
static struct pci_driver hpwdt_driver = …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…);
module_param(soft_margin, int, 0);
MODULE_PARM_DESC(…) …;
module_param_named(timeout, soft_margin, int, 0);
MODULE_PARM_DESC(…) …;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(…) …;
module_param(kdumptimeout, int, 0444);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_HPWDT_NMI_DECODING
module_param(pretimeout, bool, 0);
MODULE_PARM_DESC(…) …;
#endif
module_pci_driver(…) …;