From: linux@roeck-us•net (Guenter Roeck)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v6 05/19] watchdog: orion: Make sure the watchdog is initially stopped
Date: Thu, 06 Feb 2014 18:02:56 -0800 [thread overview]
Message-ID: <52F43ED0.4050808@roeck-us.net> (raw)
In-Reply-To: <1391707226-18258-6-git-send-email-ezequiel.garcia@free-electrons.com>
On 02/06/2014 09:20 AM, Ezequiel Garcia wrote:
> Having the watchdog initially fully stopped is important to avoid
> any spurious watchdog triggers, in case the registers are not in
> its reset state.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us•net>
> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail•com>
> Tested-by: Willy Tarreau <w@1wt•eu>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons•com>
> ---
> drivers/watchdog/orion_wdt.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
> index 6746033..2dbeee9 100644
> --- a/drivers/watchdog/orion_wdt.c
> +++ b/drivers/watchdog/orion_wdt.c
> @@ -142,6 +142,9 @@ static int orion_wdt_probe(struct platform_device *pdev)
> orion_wdt.max_timeout = wdt_max_duration;
> watchdog_init_timeout(&orion_wdt, heartbeat, &pdev->dev);
>
> + /* Let's make sure the watchdog is fully stopped */
> + orion_wdt_stop(&orion_wdt);
> +
Actually we just had that in another driver, and I stumbled over it there.
Problem with stopping the watchdog in probe unconditionally is that you can
use it to defeat nowayout: unload the module, then load it again,
and the watchdog is stopped even if nowayout is true.
Is this really what you want ? Or, in other words, what is the problem
you are trying to solve ?
Thanks,
Guenter
> watchdog_set_nowayout(&orion_wdt, nowayout);
> ret = watchdog_register_device(&orion_wdt);
> if (ret)
>
next prev parent reply other threads:[~2014-02-07 2:02 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 17:20 [PATCH v6 00/19] Armada 370/XP watchdog Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 01/19] clocksource: orion: Use atomic access for shared registers Ezequiel Garcia
2014-02-11 0:06 ` Daniel Lezcano
2014-02-11 8:30 ` Ezequiel Garcia
2014-02-11 9:11 ` Daniel Lezcano
2014-02-11 9:47 ` Ezequiel Garcia
2014-02-19 15:01 ` Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 02/19] watchdog: orion: Add clock error handling Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 03/19] watchdog: orion: Use atomic access for shared registers Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 04/19] watchdog: orion: Remove unused macros Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 05/19] watchdog: orion: Make sure the watchdog is initially stopped Ezequiel Garcia
2014-02-07 2:02 ` Guenter Roeck [this message]
2014-02-07 10:40 ` Ezequiel Garcia
2014-02-07 13:38 ` Guenter Roeck
2014-02-07 15:17 ` Ezequiel Garcia
2014-02-07 15:44 ` Jason Cooper
2014-02-07 16:55 ` Guenter Roeck
2014-02-07 17:43 ` Jason Gunthorpe
2014-02-10 12:22 ` Ezequiel Garcia
2014-02-10 16:48 ` linux at roeck-us.net
2014-02-10 16:54 ` Ezequiel Garcia
2014-02-10 16:57 ` linux at roeck-us.net
2014-02-06 17:20 ` [PATCH v6 06/19] watchdog: orion: Handle the interrupt so it's properly acked Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 07/19] watchdog: orion: Make RSTOUT register a separate resource Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 08/19] watchdog: orion: Remove unneeded BRIDGE_CAUSE clear Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 09/19] watchdog: orion: Introduce an orion_watchdog device structure Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 10/19] watchdog: orion: Introduce per-compatible of_device_id data Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 11/19] watchdog: orion: Add per-compatible clock initialization Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 12/19] watchdog: orion: Add per-compatible watchdog start implementation Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 13/19] watchdog: orion: Add support for Armada 370 and Armada XP SoC Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 14/19] ARM: mvebu: Enable Armada 370/XP watchdog in the devicetree Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 15/19] ARM: kirkwood: Add RSTOUT 'reg' entry to devicetree Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 16/19] ARM: dove: Enable Dove watchdog in the devicetree Ezequiel Garcia
2014-02-06 17:20 ` [PATCH v6 17/19] watchdog: orion: Enable the build on ARCH_MVEBU Ezequiel Garcia
2014-02-07 2:07 ` Guenter Roeck
2014-02-06 17:20 ` [PATCH v6 18/19] ARM: mvebu: Enable watchdog support in defconfig Ezequiel Garcia
2014-02-06 17:51 ` Jason Cooper
2014-02-06 19:10 ` Ezequiel Garcia
2014-02-06 19:12 ` Jason Cooper
2014-02-06 17:20 ` [PATCH v6 19/19] ARM: dove: Enable watchdog support in the defconfig Ezequiel Garcia
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=52F43ED0.4050808@roeck-us.net \
--to=linux@roeck-us$(echo .)net \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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