public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Kartik Rajput <kkartik@nvidia.com>
To: "thierry.reding@gmail.com" <thierry.reding@gmail.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	Jon Hunter <jonathanh@nvidia.com>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] clocksource: timer-tegra186: Enable WDT at probe
Date: Thu, 3 Jul 2025 08:23:14 +0000	[thread overview]
Message-ID: <0afa0fbf2c19069e710b9c506fb66bec2f904e74.camel@nvidia.com> (raw)
In-Reply-To: <3wesm6syeqmjdzyyj2mjp4sjfwl7ebeahqxwcvub6gwvoifuh4@43tunmtjsq4h>

On Thu, 2025-07-03 at 08:55 +0200, Thierry Reding wrote:
> On Mon, Jun 30, 2025 at 04:31:35PM +0530, Kartik Rajput wrote:
> > Currently, if the system crashes or hangs during kernel boot before
> > userspace initializes and configures the watchdog timer, then the
> > watchdog won’t be able to recover the system as it’s not running.
> > This
> > becomes crucial during an over-the-air update, where if the newly
> > updated kernel crashes on boot, the watchdog is needed to reset the
> > device and boot into an alternative system partition. If the
> > watchdog
> > is disabled in such scenarios, it can lead to the system getting
> > bricked.
> > 
> > Enable the WDT during driver probe to allow recovery from any
> > crash/hang
> > seen during early kernel boot. Also, disable interrupts once
> > userspace
> > starts pinging the watchdog.
> > 
> > Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
> > ---
> >  drivers/clocksource/timer-tegra186.c | 42
> > ++++++++++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> 
> This seems dangerous to me. It means that if the operating system
> doesn't start some sort of watchdog service in userspace that pings
> the
> watchdog, the system will reboot 120 seconds after the watchdog
> probe.
> 

This is not the case. The driver keeps petting the watchdog with the
ISR until userspace takes over. So, the watchdog does not expires even
if userspace takes more time to load.

Thanks & Regards,
Kartik


  parent reply	other threads:[~2025-07-03  8:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30 11:01 [PATCH] clocksource: timer-tegra186: Enable WDT at probe Kartik Rajput
2025-07-03  6:55 ` Thierry Reding
2025-07-03  7:55   ` Jon Hunter
2025-07-03 10:12     ` Thierry Reding
2025-07-03 10:26       ` Jon Hunter
2025-07-03 13:36         ` Thierry Reding
2025-07-03 14:11           ` Jon Hunter
2025-07-03 14:19             ` Thierry Reding
2025-07-03 14:42               ` Jon Hunter
2025-07-03  8:23   ` Kartik Rajput [this message]
2025-07-03 10:36 ` Jon Hunter
2025-07-03 13:40   ` Thierry Reding

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=0afa0fbf2c19069e710b9c506fb66bec2f904e74.camel@nvidia.com \
    --to=kkartik@nvidia.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    /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