mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fil Dunsky <filipp.dunsky@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	Russell King <linux@armlinux.org.uk>,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] watchdog: Add ARM TWD (MPCore private) watchdog driver
Date: Sat, 14 Nov 2026 21:52:32 +0300	[thread overview]
Message-ID: <179468235262.1897695.7261271002700550095@gmail.com> (raw)
In-Reply-To: <db3a09f6-a560-4522-9954-8aa63eb2d5fb@roeck-us.net>

Hi Guenter,

On Sat, Nov 14, 2026 at 07:56:12AM -0800, Guenter Roeck wrote:
> Watchdog drivers are supposed to watch the system as a whole, not on a
> per-CPU level. This patch goes way beyond the scope of a system watchdog
> driver. Per-CPU watchdogs are handled in kernel/watchdog.c. I do not think
> it is a good idea to overlay that with a second per-CPU watchdog mechanism.

Thanks, understood. Watching individual CPUs was not the intent: all the
watchdogs get the same timeout and are pinged together from the ioctl,
so the driver acts as one system watchdog. Going through every CPU only
follows from the registers being banked, and it is what made the driver
grow (hotplug state, CPU PM, the races Sashiko found).

The board needs one system watchdog and nothing per CPU: its boot loader
starts the watchdog of CPU0 only, and the SoC has no other watchdog.
Would a driver along these lines be acceptable?

- use the watchdog of CPU0 only: start, stop, ping and get_timeleft run
  there through smp_call_function_single();
- no CPU hotplug state: on 32-bit ARM CPU0 cannot be taken offline
  unless the platform allows it with cpu_can_disable(), and the driver
  would not probe if CPU0 is hotpluggable;
- the watchdogs of the other CPUs are not used, one found running at
  probe time is stopped;
- keep following clock rate changes and set the watchdog up again on
  resume;
- keep the restart handler.

Fil


  reply	other threads:[~2026-11-14 18:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 14:11 Fil Dunsky via B4 Relay
2026-11-14 15:56 ` Guenter Roeck
2026-11-14 18:52   ` Fil Dunsky [this message]
2026-11-16 14:05     ` Guenter Roeck

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=179468235262.1897695.7261271002700550095@gmail.com \
    --to=filipp.dunsky@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@roeck-us.net \
    --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

all inboxes | Powered by JetHome®