All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Riegel <damien.riegel@savoirfairelinux.com>
To: Harald Geyer <harald@ccbib.org>
Cc: wim@iguana.be, linux-watchdog@vger.kernel.org,
	Vivien Didelot <vivien.didelot@savoirlinux.com>,
	linux@roeck-us.net
Subject: Re: In-reply-to: <1448056496-2335-1-git-send-email-damien.riegel@savoirfairelinux.com>
Date: Mon, 23 Nov 2015 10:37:48 -0500	[thread overview]
Message-ID: <20151123153747.GA13332@localhost> (raw)
In-Reply-To: <E1a0sdo-0000RV-FA@stardust.g4.wien.funkfeuer.at>

[Ccing Guenter as he reviewed the patches]

On Mon, Nov 23, 2015 at 04:02:52PM +0100, Harald Geyer wrote:
> Hi,
> 
> sorry for breaking the threading. Only stumbled upon this message in the
> webarchive of the Mailinglist and couldn't reconstruct full headers ...
> 
> I think there is an issue with your patch:
> 
> +static int watchdog_reboot_notifier(struct notifier_block *nb,
> +				    unsigned long code, void *data)
> +{
> +	struct watchdog_device *wdd = container_of(nb, struct watchdog_device,
> +						   reboot_nb);
> +
> +	if (code == SYS_DOWN || code == SYS_HALT) {
> 
> I think you want this to be (code == SYS_POWER_OFF || code == SYS_HALT)
> AFAIK SYS_DOWN is the code for a reboot, where the system should come
> back up immediatly, so probably we shouldn't disable the watchdog in
> this case, for the system might crash during going down.

Well, most of the drivers (all of them but gpio) that I changed stopped
on SYS_HALT and SYS_DOWN, so they explicitely wanted to stop the
watchdog on reboot. I just factorized that in watchdog core.

Maybe they should not stop on reboot in the first place, but this serie
does not introduce a new behaviour. Also, note that the watchdog will
be stopped only if it registers for that by calling
watchdog_stop_on_reboot, so there is no side effect for watchdogs that
should not be stopped.

> 
> More importantly however we should stop the watchdog on SYS_POWER_OFF
> I think.
> 
My understanding here is that if the system is powered off, the watchdog
will be powered off too, so there is no need to stop it.


Damien

> Otherwise your series looks good to me and I look forward to rebase
> my own patches on it.
> 
> HTH,
> Harald
> 
> +		if (watchdog_active(wdd)) {
> +			int ret;
> +
> +			ret = wdd->ops->stop(wdd);
> +			if (ret)
> +				return NOTIFY_BAD;
> +		}
> +	}
> +
> +	return NOTIFY_DONE;
> +}
> -- 
> If you want to support my work:
> see http://friends.ccbib.org/harald/supporting/
> or donate via bitcoin to 1FUtd8T9jRN1rFz63vZz7s2fDtB6d6A7aS

  reply	other threads:[~2015-11-23 15:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 21:54 [PATCH v2 0/6] watchdog: factorize reboot notifier registration Damien Riegel
2015-11-20 21:54 ` [PATCH v2 1/6] watchdog: core: add reboot notifier support Damien Riegel
2015-11-21  1:10   ` Guenter Roeck
2015-11-23 15:02   ` In-reply-to: <1448056496-2335-1-git-send-email-damien.riegel@savoirfairelinux.com> Harald Geyer
2015-11-23 15:37     ` Damien Riegel [this message]
2015-11-23 18:20       ` Harald Geyer
2015-11-23 23:31         ` Damien Riegel
2015-11-25 17:04           ` Harald Geyer
2015-11-25 18:37             ` Guenter Roeck
2015-11-25 21:56               ` Harald Geyer
2015-11-25 22:10                 ` Guenter Roeck
2015-11-23 15:57     ` Guenter Roeck
2015-11-20 21:54 ` [PATCH v2 2/6] watchdog: bcm47xx_wdt: use core reboot notifier Damien Riegel
2015-11-20 21:54 ` [PATCH v2 3/6] watchdog: cadence_wdt: " Damien Riegel
2015-11-20 21:54 ` [PATCH v2 4/6] watchdog: gpio_wdt: " Damien Riegel
2015-11-21  1:11   ` Guenter Roeck
2015-11-20 21:54 ` [PATCH v2 5/6] watchdog: softdog: " Damien Riegel
2015-11-20 21:54 ` [PATCH v2 6/6] watchdog: w83627hf_wdt: " Damien Riegel
2015-11-21  1:10   ` Guenter Roeck
2015-12-27 16:50 ` [PATCH v2 0/6] watchdog: factorize reboot notifier registration Wim Van Sebroeck

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=20151123153747.GA13332@localhost \
    --to=damien.riegel@savoirfairelinux.com \
    --cc=harald@ccbib.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=vivien.didelot@savoirlinux.com \
    --cc=wim@iguana.be \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.