mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Eduardo Valentin <eduval@amazon.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Eduardo Valentin <evalenti@kernel.org>
Subject: Re: [PATCH 1/1] watchdog: aspeed: add nowayout support
Date: Fri, 11 Feb 2022 20:02:04 -0800	[thread overview]
Message-ID: <af800c8b-8ad8-a335-0f72-ee636c02e9ef@roeck-us.net> (raw)
In-Reply-To: <20220212021033.2344-1-eduval@amazon.com>

On 2/11/22 18:10, Eduardo Valentin wrote:
> Add support for not stopping the watchdog
> when the userspace application quits. At
> closing of the device, the driver cannot
> determine if this was a graceful closure
> or if the app crashed. If the support
> of nowayout on this driver, the system integrator
> can select the behaviour by setting the kernel
> config and enabling it.
> 
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org> (maintainer:WATCHDOG DEVICE DRIVERS)
> Cc: Guenter Roeck <linux@roeck-us.net> (maintainer:WATCHDOG DEVICE DRIVERS)
> Cc: Joel Stanley <joel@jms.id.au> (supporter:ARM/ASPEED MACHINE SUPPORT)
> Cc: Andrew Jeffery <andrew@aj.id.au> (reviewer:ARM/ASPEED MACHINE SUPPORT)
> Cc: linux-watchdog@vger.kernel.org (open list:WATCHDOG DEVICE DRIVERS)
> Cc: linux-arm-kernel@lists.infradead.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
> Cc: linux-aspeed@lists.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
> Cc: linux-kernel@vger.kernel.org (open list)
> Signed-off-by: Eduardo Valentin <eduval@amazon.com>
> Signed-off-by: Eduardo Valentin <evalenti@kernel.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/aspeed_wdt.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
> index 436571b6fc79..bd06622813eb 100644
> --- a/drivers/watchdog/aspeed_wdt.c
> +++ b/drivers/watchdog/aspeed_wdt.c
> @@ -13,6 +13,11 @@
>   #include <linux/platform_device.h>
>   #include <linux/watchdog.h>
>   
> +static bool nowayout = WATCHDOG_NOWAYOUT;
> +module_param(nowayout, bool, 0);
> +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
> +				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> +
>   struct aspeed_wdt {
>   	struct watchdog_device	wdd;
>   	void __iomem		*base;
> @@ -266,6 +271,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
>   	wdt->wdd.timeout = WDT_DEFAULT_TIMEOUT;
>   	watchdog_init_timeout(&wdt->wdd, 0, dev);
>   
> +	watchdog_set_nowayout(&wdt->wdd, nowayout);
> +
>   	np = dev->of_node;
>   
>   	ofdid = of_match_node(aspeed_wdt_of_table, np);


      reply	other threads:[~2022-02-12  4:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12  2:10 Eduardo Valentin
2022-02-12  4:02 ` Guenter Roeck [this message]

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=af800c8b-8ad8-a335-0f72-ee636c02e9ef@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andrew@aj.id.au \
    --cc=eduval@amazon.com \
    --cc=evalenti@kernel.org \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --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®