From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: How to atomically disable shared device interrupt?
Date: Wed, 4 Feb 2009 20:30:28 +0300 [thread overview]
Message-ID: <200902042030.31580.arvidjaar@mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
May be I miss something obvious, but I do not see how is it possible to
disable interrupt while also avoiding either "stealing" someone else's
interrupt or getting "IRQ: nobody cared" occasionally.
So consider device that has status register that indicates events of
interest that happened in device. Those events may also generate
interrupt if interrupt generation is enabled; but they also are posted
even if interrupt generation is disabled.
So to check whether interrupt handler should handle (shared) interrupt
it a) checks that interrupts are currently enabled and b) that device
indicates pending events.
No consider what happens when interrupts are disabled on device.
CPU1 CPU2
IRQ posted
disable device interrupts
handler checks IRQ enabled
handler sees IRQ disabled
handler ignores interrupt
Actually the same race happens during enabling of interrupts
CPU1 CPU2
IRQ enabled
other device posts IRQ
handler checks
IRQ enabled
events pending
start processing
but IRQ was posted by some other device in the first place.
Any idea?
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
reply other threads:[~2009-02-04 17:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200902042030.31580.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--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®