From: timo.kokkonen@offcode.fi (Timo Kokkonen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 0/2] watchdog: Introduce "early-timeout-sec" property
Date: Thu, 19 Feb 2015 10:01:44 +0200 [thread overview]
Message-ID: <cover.1424332841.git.timo.kokkonen@offcode.fi> (raw)
Currently we have no means to adjust the watchdog behavior on early
start up before user space has opened the device. The generic behavior
among the watchdog drivers is to not start the watchdog at all (or
disable it, if possible, or in case at91sam9_wdt, start a kernel timer
that keeps on pinging the watchdog on behalf of user space until a
watchdog daemon opens it). This unfortunately opens a time window
between starting the driver and starting the user space watchdog
daemon where a crash in the kernel or user space might prevent the
watchdog from ever resetting the device at all. This is obviously bad
on production systems.
Introduce a new device tree property that, when set, changes the
watchdog driver behavior in such way that there no longer is any
window where crash is not caught by the watchdog. In atmel HW we need
to use a kernel timer to ping the watchdog for the duration of the
timeout, but that is trivial as we already have a timer there that
keeps pinging it until the watchdog device is open. The documentation
however only states how the driver should behave, not how it should be
implemented in some other watchdog hardware.
Patch revision history:
-v4: Binding documentation is now separated completely from the driver
patch. The documentation no longer makes any assumptions about how
the actual implementation is made, it just describes the actual
behavior the driver should implement in order to satisfy the
requirement.
- v3: Rename the property to "early-timeout-sec" and use it as a
timeout value that stops the timer in the atmel driver after the
timeout expires. A watchdog.txt is also introduced for documenting
the common watchdog properties, including now this one and
"timeout-sec" property.
- v2: Rename the property to "enable-early-reset" as the behavior
itself is not atmel specific. This way other drivers are free to
implement same behavior with the same property name.
- v1: Propose property name "atmle,no-early-timer" for disabling the
timer that keeps the atmel watchdog running until user space opens
the device.
Timo Kokkonen (2):
at91sam9_wdt: Allow watchdog to reset device at early boot
devicetree: Document generic watchdog properties
.../devicetree/bindings/watchdog/watchdog.txt | 20 ++++++++++++++++++++
drivers/watchdog/at91sam9_wdt.c | 9 ++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/watchdog.txt
--
2.1.0
next reply other threads:[~2015-02-19 8:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 8:01 Timo Kokkonen [this message]
2015-02-19 8:01 ` [PATCHv4 1/2] at91sam9_wdt: Allow watchdog to reset device at early boot Timo Kokkonen
2015-02-19 8:01 ` [PATCHv4 2/2] devicetree: Document generic watchdog properties Timo Kokkonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1424332841.git.timo.kokkonen@offcode.fi \
--to=timo.kokkonen@offcode.fi \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).