From: David Laight <David.Laight@ACULAB.COM>
To: 'Guenter Roeck' <linux@roeck-us.net>,
Phil Eichinger <phil@zankapfel.net>,
"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
"joel@jms.id.au" <joel@jms.id.au>,
"andrew@codeconstruct.com.au" <andrew@codeconstruct.com.au>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] watchdog: aspeed: replace mdelay with msleep
Date: Sat, 14 Dec 2024 21:21:12 +0000 [thread overview]
Message-ID: <d7ab80332def4a328cb9492fddcb8bef@AcuMS.aculab.com> (raw)
In-Reply-To: <3fe75eab-e700-4ae2-984b-42342ec7d784@roeck-us.net>
From: Guenter Roeck
> Sent: 12 December 2024 13:56
> To: Phil Eichinger <phil@zankapfel.net>; wim@linux-watchdog.org; joel@jms.id.au;
> andrew@codeconstruct.com.au; linux-watchdog@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] watchdog: aspeed: replace mdelay with msleep
>
> On 12/12/24 03:30, Phil Eichinger wrote:
> > Since it is not called in an atomic context the mdelay function
> > can be replaced with msleep to avoid busy wait.
> >
> > Signed-off-by: Phil Eichinger <phil@zankapfel.net>
> > ---
> > 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 b4773a6aaf8c..98ef341408f7 100644
> > --- a/drivers/watchdog/aspeed_wdt.c
> > +++ b/drivers/watchdog/aspeed_wdt.c
> > @@ -208,7 +208,7 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd,
> > wdt->ctrl &= ~WDT_CTRL_BOOT_SECONDARY;
> > aspeed_wdt_enable(wdt, 128 * WDT_RATE_1MHZ / 1000);
> >
> > - mdelay(1000);
> > + msleep(1000);
> >
> > return 0;
> > }
> This is a _restart_ handler. The only purpose of the delay is to wait
> for the reset to trigger. It is not supposed to sleep.
With the recent scheduler changes isn't the code likely to get
pre-empted?
Which (effectively) converts is to a sleep?
David
>
> NACK.
>
> Guenter
>
>
>
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2024-12-14 21:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 11:30 [PATCH] watchdog: aspeed: replace mdelay with msleep Phil Eichinger
2024-12-12 13:56 ` Guenter Roeck
2024-12-14 21:21 ` David Laight [this message]
2024-12-14 21:46 ` Guenter Roeck
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=d7ab80332def4a328cb9492fddcb8bef@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=andrew@codeconstruct.com.au \
--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=linux@roeck-us.net \
--cc=phil@zankapfel.net \
--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