Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1624423

Re: [PATCH] drivers:watchdog:aspeed_wdt: using msleep instead of mdelay

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH] drivers:watchdog:aspeed_wdt: using msleep instead of mdelay
Date 2017-04-16 22:00 +0200
Message-ID <twYv0-7Im-1@gated-at.bofh.it> (permalink)
References <twVnr-5TD-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/16/2017 09:33 AM, Karim Eshapa wrote:
> that's useful for the scheduler, power management unless
> the driver needs to delay in atomic context
> look at documentation/timers/timers-howto
>
> Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com>
> ---
>  drivers/watchdog/aspeed_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
> index 1c65258..17f06d1 100644
> --- a/drivers/watchdog/aspeed_wdt.c
> +++ b/drivers/watchdog/aspeed_wdt.c
> @@ -115,7 +115,7 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd,
>
>  	aspeed_wdt_enable(wdt, 128 * WDT_RATE_1MHZ / 1000);
>
> -	mdelay(1000);
> +	msleep(1000);
>
>  	return 0;
>  }
>
Possibly, but how can you guarantee that the restart function is called with interrupts
enabled ? Also, why would it be necessary or even useful for the scheduler to do anything
while the system is in the process of restarting ?

Guenter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] drivers:watchdog:aspeed_wdt: using msleep instead of mdelay Karim Eshapa <karim.eshapa@gmail.com> - 2017-04-16 18:40 +0200
  Re: [PATCH] drivers:watchdog:aspeed_wdt: using msleep instead of  mdelay Guenter Roeck <linux@roeck-us.net> - 2017-04-16 22:00 +0200
    Re:drivers:watchdog:aspeed_wdt: using msleep instead of mdelay Karim Eshapa <karim.eshapa@gmail.com> - 2017-04-17 19:10 +0200
      Re: drivers:watchdog:aspeed_wdt: using msleep instead of mdelay Guenter Roeck <linux@roeck-us.net> - 2017-04-17 19:30 +0200

csiph-web