Improve meson_gxbb_wdt driver
Source: https://lore.kernel.org/linux-watchdog/5229d62c-b327-254f-800f-1524f27491b3@roeck-us.net/T/
Remade using all suggestions from Guenter
* Added nowayout module parameter
* Added timeout module parameter
* Removed watchdog_stop_on_reboot (I feel that it is important to keep
the watchdog running during the reboot sequence, in the event that an
abnormal driver freezes the reboot process. This is my personal opinion
and I hope the driver authors will agree with my proposal, if not just
ignore this last commit)
Artem Lapkin (3):
watchdog: meson_gxbb_wdt: add nowayout parameter
watchdog: meson_gxbb_wdt: add timeout parameter
watchdog: meson_gxbb_wdt: remove stop_on_reboot
drivers/watchdog/meson_gxbb_wdt.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
@@ -34,6 +34,11 @@ module_param(nowayout, bool, 0);MODULE_PARM_DESC(nowayout,"Watchdog cannot be stopped once started default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")");+staticunsignedinttimeout=DEFAULT_TIMEOUT;+module_param(timeout,uint,0);+MODULE_PARM_DESC(timeout,"Watchdog heartbeat in seconds="+__MODULE_STRING(DEFAULT_TIMEOUT)")");+structmeson_gxbb_wdt{void__iomem*reg_base;structwatchdog_devicewdt_dev;
@@ -180,6 +185,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)data->wdt_dev.max_hw_heartbeat_ms=GXBB_WDT_TCNT_SETUP_MASK;data->wdt_dev.min_timeout=1;data->wdt_dev.timeout=DEFAULT_TIMEOUT;+watchdog_init_timeout(&data->wdt_dev,timeout,dev);watchdog_set_nowayout(&data->wdt_dev,nowayout);watchdog_set_drvdata(&data->wdt_dev,data);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
@@ -34,6 +34,11 @@ module_param(nowayout, bool, 0);MODULE_PARM_DESC(nowayout,"Watchdog cannot be stopped once started default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")");+staticunsignedinttimeout=DEFAULT_TIMEOUT;
DEFAULT_TIMEOUT is already set below. The default for the module parameter
should be 0. This way the watchdog core takes the value from devicetree
unless a module parameter is provided.
Guenter
This warrants a much longer explanation to even be considered.
Your explanation/reasoning needs to be here. Others won't have
the benefit of reading the summary e-mail, even more so since
you declined to number and sequence the series.
Personally' I don't find it acceptable, but I'll be happy to
listen to input from others. Such changes should be based on
real problems, not on personal opinions. If we accept this patch,
someone else might come in later reverting it with the personal
opinion that some reboots take longer than the watchdog timeout.
Guenter
From: Art Nikpal <hidden> Date: 2021-07-30 02:09:32
Yes i totally agree with you , i will rewrite this patches again
properly and explain more detail about why need remove
watchdog_stop_on_reboot
i have check already other watchdog sources / half of them have
watchdog_stop_on_reboot another half dont have it , and i think both
have some reasons
I'll be happy tolisten to input from others.
Same will be happy.
Our situation very simple - meson platform still have some hardware
drivers problems for some configuration which can freeze device on
shutdown/reboot stage and i hope better to have some reboot warranty
some reboots take longer than the watchdog timeout.
I have check this situation to - our drivers shutdown stage its about
1 sec default watchdog timeout 30 sec i think its enough - cant see
any problem
anybody can use watchdog.stop_on_reboot=1 if need freeze identification.
Artem
On Thu, Jul 29, 2021 at 10:23 PM Guenter Roeck [off-list ref] wrote:
On 7/29/21 12:23 AM, Artem Lapkin wrote:
quoted
Remove watchdog_stop_on_reboot()
This warrants a much longer explanation to even be considered.
Your explanation/reasoning needs to be here. Others won't have
the benefit of reading the summary e-mail, even more so since
you declined to number and sequence the series.
Personally' I don't find it acceptable, but I'll be happy to
listen to input from others. Such changes should be based on
real problems, not on personal opinions. If we accept this patch,
someone else might come in later reverting it with the personal
opinion that some reboots take longer than the watchdog timeout.
Guenter