[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409053452.3173447-3-george.cherian@marvell.com>
Date: Wed, 9 Apr 2025 05:34:52 +0000
From: George Cherian <george.cherian@...vell.com>
To: <linux@...ck-us.net>, <wim@...ux-watchdog.org>, <a.fatoum@...gutronix.de>
CC: <linux-watchdog@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"George
Cherian" <george.cherian@...vell.com>
Subject: [PATCH v5 2/2] drivers: sbsa_gwdt: Enable the reset_on_panic feature
Set the WDIOF_OPS_ATOMIC for sbsa_gwdt driver, since the ops are atomic.
Also set the reset_on_panic timeout, this enables the panic notifier to
be registered by watchdog core and use the reset_on_panic timeout to be
configured in case of kernel panic. reset_on_panic is by default set to
60sec. This can be modified runtime via sysfs.
Signed-off-by: George Cherian <george.cherian@...vell.com>
---
drivers/watchdog/sbsa_gwdt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 5f23913ce3b4..fd5095137712 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -92,6 +92,7 @@ struct sbsa_gwdt {
};
#define DEFAULT_TIMEOUT 10 /* seconds */
+#define DEFAULT_RESET_ON_PANIC_TIMEOUT 60 /* seconds */
static unsigned int timeout;
module_param(timeout, uint, 0);
@@ -242,6 +243,7 @@ static const struct watchdog_info sbsa_gwdt_info = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE |
+ WDIOF_OPS_ATOMIC |
WDIOF_CARDRESET,
};
@@ -291,6 +293,7 @@ static int sbsa_gwdt_probe(struct platform_device *pdev)
wdd->ops = &sbsa_gwdt_ops;
wdd->min_timeout = 1;
wdd->timeout = DEFAULT_TIMEOUT;
+ wdd->reset_on_panic = DEFAULT_RESET_ON_PANIC_TIMEOUT;
watchdog_set_drvdata(wdd, gwdt);
watchdog_set_nowayout(wdd, nowayout);
sbsa_gwdt_get_version(wdd);
--
2.34.1
Powered by blists - more mailing lists