mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cypher Wu <cypher.w@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Questions about Watch Dog Timer under Linux.
Date: Fri, 11 Dec 2009 16:33:23 +0800	[thread overview]
Message-ID: <f9f38a550912110033n69e3a3cdncec253e3102e884e@mail.gmail.com> (raw)
In-Reply-To: <20091209162958.3b98c077@lxorguk.ukuu.org.uk>

I'm not sure if there is already a framework to cope with this
situation, or I've design it myself to use kernel thread to work with
the real WDT and interface to the user space application? And since
the WDT start to work just a very short interval after the system
power on, do I have to modify mboot  and Linux kernel to support dog
clearing from the very beginning?


On Thu, Dec 10, 2009 at 12:29 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> products is usually a seperate chip on the board wich will start to
>> work after power reset and will time out in 2 seconds. The system has
>> to start dog clearing from the very beginning and there have no way to
>> disable WDT.
>
> That will be fun as you will probably need to start some kind of kernel
> task refereshing it early in boot unless your boot is very quick.
>
> If it cannot be disabled then you don't need to support the disable
> option. The watchdog API is a range of features designed to cover all
> watchdogs. Many only have a few of the features. A large number of the
> supported watchdogs only support a single timeout rate.
>
>> Is this the pattern we have to follow to use WDT under Linux? We have
>> to choose a chip as WDT, and it seems the chip we've familiar under
>> embedded systems can't be used under Linux?
>
> There are two ways to handle this depending on your needs and what the
> applications require. The first is to provide the real hardware interface
> - 2 second fixed timeout, no disable. That's perfectly sufficient.
>
> The other (which some devices do) is to create a kernel thread that
> refreshes the watchdog each second but *only* if a user application has
> made a watchdog call within the last [whatever] seconds. That also allows
> you to provide a disableable watchdog. More flexible but extra work and
> if your embedded system doesn't need the extra facilities - why bother 8)
>
>

  reply	other threads:[~2009-12-11  8:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09 14:47 Cypher Wu
2009-12-09 14:59 ` Mark Brown
2009-12-11  8:27   ` Cypher Wu
2009-12-11 10:21     ` Mark Brown
2009-12-12  3:46       ` Cypher Wu
2009-12-12 13:50         ` Alan Cox
2009-12-09 16:29 ` Alan Cox
2009-12-11  8:33   ` Cypher Wu [this message]
2009-12-09 17:26 ` Pádraig Brady
2009-12-11  8:38   ` Cypher Wu

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=f9f38a550912110033n69e3a3cdncec253e3102e884e@mail.gmail.com \
    --to=cypher.w@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®