diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2021-04-06 10:14:53 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-13 16:05:27 +0200 |
commit | 50a37459ff991cab97e7326490d0637ff1106cc8 (patch) | |
tree | 009f8b5a0bcb9bdd0d1e509c1ad55af31341c413 /examples/var_service | |
parent | 9c210f0efb1959895df237a96210a73253b5b9ed (diff) |
watchdog: make open-write-close-open functionality a config knob
The behaviour introduced by commit 31c765081dc4 ("watchdog: stop
watchdog first on startup") causes warnings in the kernel log when the
nowayout feature is enabled:
[ 16.212184] watchdog: watchdog0: nowayout prevents watchdog being stopped!
[ 16.212196] watchdog: watchdog0: watchdog did not stop!
The latter may also appear by itself in case the watchdog is of the
type that cannot be stopped once started (e.g. the common
always-running gpio_wdt kind).
These warnings can be somewhat ominous and distracting, so allow
configuring whether to use this open-write-close-open sequence rather
than just open. Also saves a bit of .text when disabled:
function old new delta
shutdown_on_signal 31 58 +27
watchdog_main 339 306 -33
shutdown_watchdog 34 - -34
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 27/-67) Total: -40 bytes
Make it default n:
- It's a workaround for one specific type of watchdog (and
that seems to be a defect in the kernel driver)
- Even when not enabled in busybox config, it can easily be
implemented outside busybox
- Code size
- Commit 31c765081dc4 should be considered a regression for all the
boards that now end up with KERN_CRIT warnings in dmesg.
- The author of that commit said "This use case is evidently rare, so
if it is indeed causing problems for other people I'd OK then I
understand whatever needs to be done." in the v1 thread.
Cc: Matt Spinler <mspinler@linux.vnet.ibm.com>
Cc: deweloper@wp.pl
Cc: tito <farmatito@tiscali.it>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'examples/var_service')
0 files changed, 0 insertions, 0 deletions