From: Arnd Bergmann <arnd@arndb.de>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Watchdog Mailing List <linux-watchdog@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 7/10 v2] Generic Watchdog Timer Driver
Date: Sat, 18 Jun 2011 21:07:45 +0200 [thread overview]
Message-ID: <201106182107.45682.arnd@arndb.de> (raw)
In-Reply-To: <20110618172537.GH3441@infomag.iguana.be>
On Saturday 18 June 2011 19:25:37 Wim Van Sebroeck wrote:
> diff -urN linux-2.6.38-generic-part6/Documentation/watchdog/src/watchdog-with-timer-example.c linux-2.6.38-generic-part7/Documentation/watchdog/src/watchdog-with-timer-example.c
> --- linux-2.6.38-generic-part6/Documentation/watchdog/src/watchdog-with-timer-example.c 2011-06-16 21:04:06.283940741 +0200
> +++ linux-2.6.38-generic-part7/Documentation/watchdog/src/watchdog-with-timer-example.c 2011-06-17 09:52:32.866632635 +0200
> @@ -45,6 +45,11 @@
> MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. "
> "(default = " __MODULE_STRING(WDT_TIMEOUT) ")");
>
> +static int nowayout = WATCHDOG_NOWAYOUT;
> +module_param(nowayout, int, 0);
> +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started. "
> + "(default = " __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> +
> static struct watchdog_device wdt_dev;
> static void wdt_timer_tick(unsigned long data);
> static DEFINE_TIMER(timer, wdt_timer_tick, 0, 0);
> @@ -152,6 +157,8 @@
>
> /* Set watchdog_device parameters */
> wdt_dev.timeout = timeout;
> + if (nowayout)
> + set_bit(WDOG_NO_WAY_OUT, &wdt_dev.status);
>
> /* Register the watchdog timer device */
> res = watchdog_register_device(&wdt_dev);
Why is this a feature of the individual drivers and not of the core?
Maybe it can be in both, so existing drivers don't need to change the user
interface, but new drivers don't have to provide the option individually
when you can simply set it for the base module.
Arnd
next prev parent reply other threads:[~2011-06-18 19:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-18 17:25 [PATCH 7/10 v2] Generic Watchdog Timer Driver Wim Van Sebroeck
2011-06-18 19:07 ` Arnd Bergmann [this message]
2011-06-19 10:03 ` Alan Cox
2011-06-19 11:25 ` Arnd Bergmann
2011-06-19 14:19 ` Alan Cox
2011-06-19 17:29 ` Mark Lord
2011-06-22 20:13 ` Wim Van Sebroeck
2011-06-23 14:13 ` Mark Lord
2011-06-24 14:55 ` Arnd Bergmann
2011-06-24 19:17 ` Wim Van Sebroeck
2011-06-24 21:14 ` Arnd Bergmann
2011-06-22 19:56 ` 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=201106182107.45682.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox