[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 4 May 2014 23:27:26 -0500
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: linux-watchdog@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Wim Van Sebroeck <wim@...ana.be>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Arnd Bergmann <arnd@...db.de>,
Russell King <linux@....linux.org.uk>,
Jonas Jensen <jonas.jensen@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/5] watchdog: Add API to trigger reboots
On Fri, May 02, 2014 at 09:29:25PM -0700, Guenter Roeck wrote:
> > > + if (wdd->ops->reboot)
> > > + wdd_reboot_dev = wdd;
> > > +
> >
> > Overall, it looks really great, but I guess we can make it a
> > list. Otherwise, we might end up in a situation where we could not
> > reboot anymore, like this one for example:
> > - a first watchdog is probed, registers a reboot function
> > - a second watchdog is probed, registers a reboot function that
> > overwrites the first one.
> > - then, the second watchdog disappears for some reason, and the
> > reboot is set to NULL
> >
> I thought about that, but how likely (or unlikely) is that to ever happen ?
> So I figured it is not worth the effort, and would just add complexity without
> real gain. We could always add the list later if we ever encounter a situation
> where two watchdogs in the same system provide a reboot callback.
The A31 we were discussing about in the other thread that doesn't have
a watchdog driver yet has four, identical, watchogs. I'm not really
concerned about the mentionned issue, since they will never be
removed, but the situation might happen with an on-SoC watchdog and an
i2c one (if that even exists).
But yes, right, that can be postponed.
> > Or maybe we can just use the start callback, with the min timeout already
> > registered, and prevent the user to kick the watchdog.
> >
> Doesn't always work, unfortunately, even now. The moxart driver causes
> an explicit and immediate reset. Also, some watchdogs don't reset the system
> directly but get an interrupt, which then calls the reset handler. Which,
> in our case, would call the start callback again, and you would have an endless
> loop.
Ok. You have my Acked-by then.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists