From: Ben Nizette <bn@niasdigital.com>
To: Marco <marco.stornelli@coritel.it>
Cc: Jamie Lokier <jamie@shareable.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-embedded@vger.kernel.org
Subject: Re: Power cut in management
Date: Sun, 19 Oct 2008 08:33:34 +1100 [thread overview]
Message-ID: <1224365614.4208.27.camel@moss.renham> (raw)
In-Reply-To: <48FA0851.4010209@coritel.it>
On Sat, 2008-10-18 at 18:01 +0200, Marco wrote:
> The only problem is: what
> happens if before I install the irq handler the user turn off the
> system? I mean I can't "loose" the interrupt. In this case it'd be like
> a spurious interrupt from system point view. Let me know if I'm wrong.
> Thanks.
>
Make sure that
1- The grace period the hardware guys give you is long enough,
theoretically, to install the handler _and_ handle it
1a- The grace period is guaranteed no matter how long the system has
been on for
2- make the interrupt level-triggered so you don't miss it (note that
that interrupt should be disabled before a handler is registered so you
won't get a spurious interrupt)
3- ensure you don't do anything which would be affected by incorrect
power, such as fs writes, before the handler has been installed both in
the kernel and in userspace.
You should be fine :-)
--Ben.
prev parent reply other threads:[~2008-10-18 21:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-18 11:20 Power cut in management marco.stornelli
2008-10-18 11:49 ` Jamie Lokier
2008-10-18 12:04 ` David Woodhouse
2008-10-18 12:56 ` Jamie Lokier
2008-10-18 13:31 ` David Woodhouse
2008-10-18 13:38 ` Jamie Lokier
2008-10-18 16:01 ` Marco
2008-10-18 21:33 ` Ben Nizette [this message]
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=1224365614.4208.27.camel@moss.renham \
--to=bn@niasdigital.com \
--cc=dwmw2@infradead.org \
--cc=jamie@shareable.org \
--cc=linux-embedded@vger.kernel.org \
--cc=marco.stornelli@coritel.it \
/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