Re: [RFC PATCH] watchdog: renesas_wdt: don't sleep in atomic context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Convert usleep_range() to udelay() to avoid the bug. The downside is
> > busy looping when the watchdog is started or stopped (64us or 96us in my
> > case). However, this happens rarely enough, so it seems acceptable.
> > 
> > Fixes: b836005b4f95 ("watchdog: renesas_wdt: Add a few cycles delay")
> > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> > ---
> > 
> > We could also add a new flag in the watchdog core "IS_RESTARTING" or
> > similar and check that in the driver. Depending on the flag, we use
> > udelay() or usleep_range(). Not sure, if this is feasible or
> > over-engineered, though. Looking forward for comments.
> 
> Seems to be neither to me. I don't know if there are many drivers who sleep
> in the stop function, but even if there are none (today) it would be a
> generic problem.
> 
> On a side note, I am quite sure there is a system wide flag indicating
> that the system is rebooting. Maybe we can just use that ?

So, it took me a while to get back to this. Yes, we can use system_state
to determine which udelay to use. I am working on a helper for that.
However, as it turned out, this driver needs a different approach
because there were multiple issues with reusing the generic wdt-start
routine. Proper patch will come in some minutes.

Thanks for your input!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux