From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-renesas-soc@vger.kernel.org,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v2 2/2] watchdog: renesas_wwdt: add driver
Date: Tue, 14 Oct 2025 23:19:07 +0200 [thread overview]
Message-ID: <aO6-S6uC1aEsAsNL@shikoro> (raw)
In-Reply-To: <9c1a61f6-f9aa-40b8-9578-adf0e443d790@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]
Hi Guenter,
thanks for the fast review!
> > + * The WWDT can only be setup once after boot. Because we cannot know if this
> > + * already happened in early boot stages, it is mandated that the firmware
> > + * configures the watchdog. Linux then adapts according to the given setup.
>
> What if it didn't happen ? Is WDTA0OVF set to a reasonable default in that case ?
It will overflow pretty fast, but it will be in a working condition,
generally.
>
> > + * Note that this watchdog only reports an overflow to the Error Control Module.
>
> Kind of unusual. Why not panic in that case, and why have the watchdog in the first
> place ?
We have multiple WWDTs on the SoCs, namely as much as we have cores. The
idea is to utilize one per SoC. In normal configuration, the Error
Control Module (ECM) gets notified of overflows and will act
accordingly. It has more options than a reset, it can e.g. raise
dedicated pins to trigger actions. Sadly, we don't have a driver for ECM
yet upstream, but we need to start somewhere.
> > + struct wwdt_priv *priv = watchdog_get_drvdata(wdev);
> > +
> Maybe use container_of() ?
Ok.
> > +static irqreturn_t wwdt_error_irq(int irq, void *dev_id)
> > +{
> > + struct device *dev = dev_id;
> > +
> > + dev_warn(dev, "Watchdog timed out\n");
>
> So the pretimeout may trigger a reboot (panic) if the pretimeout
> governor is set to it, but the real watchdog just says Hi.
> Does that really make sense ?
It depends on how the ECM is configured. It can make sense. If someone
misconfigures, it might not make sense. But maybe we just don't use
pretimeout here because for Linux this is system-wide while the WWDT
usually has a smaller scale?
Does this make it more clear?
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-10-14 21:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 11:29 [PATCH v2 0/2] watchdog: add Renesas Window Watchdog support Wolfram Sang
2025-10-14 11:29 ` [PATCH v2 1/2] dt-bindings: watchdog: Add Renesas WWDT Wolfram Sang
2025-10-17 20:34 ` Rob Herring (Arm)
2025-10-14 11:29 ` [PATCH v2 2/2] watchdog: renesas_wwdt: add driver Wolfram Sang
2025-10-14 15:10 ` Guenter Roeck
2025-10-14 21:19 ` Wolfram Sang [this message]
2025-10-15 10:25 ` Guenter Roeck
2025-10-16 7:44 ` Wolfram Sang
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=aO6-S6uC1aEsAsNL@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=geert+renesas@glider.be \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=magnus.damm@gmail.com \
--cc=wim@linux-watchdog.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