RE: [RFC] watchdog: renesas_wdt: don't keep timer value during suspend/resume

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

 



Hello Wolfram,

> From: Wolfram Sang <wsa@xxxxxxxxxxxxx>
> Sent: 07 December 2018 21:45
> Subject: Re: [RFC] watchdog: renesas_wdt: don't keep timer value during suspend/resume
>
> Hi Guenter, all,
>
> > > After discussing this mail thread [1] again, we concluded that giving
> > > userspace enough time to prepare is our favourite option. So, do not
> > > keep the time value when suspended but reset it when resuming.
> > >
> > > [1] https://patchwork.kernel.org/patch/10252209/
> > >
> > > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> >
> > Above exchange says it all, no need to repeat.
> >
> > Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
>
> Thanks.
>
> I can relate to the policy argument, though. Regardless of this patch, I
> wonder if we can make it configurable from userspace. A draft:
>
> #defineWDIOF_RESUME_OPTS0x0800
>
> #defineWDIOS_RESUME_KEEP0x0008
> #defineWDIOS_RESUME_RESET0x0010
>
> and then in watchdog_ioctl() under WDIOC_SETOPTIONS:
>
> if (!(wdd->info->options & WDIOF_RESUME_OPTS))
> err = -EOPNOTSUPP;
> goto break;
>
> if (val & WDIOS_RESUME_KEEP)
> wdd->status |= WDOG_KEEP_TIMER_WHEN_RESUME;
>
> if (val & WDIOS_RESUME_RESET)
> wdd->status ~= ~WDOG_KEEP_TIMER_WHEN_RESUME;
>
> So, drivers with WDIOF_RESUME_OPTS could act on the
> WDOG_KEEP_TIMER_WHEN_RESUME flag.
>
> Opinions?

This probably allows for user customization and yet could keep the current
behaviour in place, therefore I think it's a good start. Maybe once every single
driver makes an informed decision during suspend-resume we could drop one
of the flags?

Thanks,
Fab

>
> Thanks,
>
>    Wolfram



[https://www2.renesas.eu/media/email/unicef.jpg]

This Christmas, instead of sending out cards, Renesas Electronics Europe have decided to support Unicef with a donation. For further details click here<https://www.unicef.org/> to find out about the valuable work they do, helping children all over the world.
We would like to take this opportunity to wish you a Merry Christmas and a prosperous New Year.



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.




[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