From: Thomas Gleixner <tglx@linutronix.de>
To: Pawel MOLL <pawel.moll@st.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: genirq default_disable()
Date: Tue, 23 Jun 2009 18:31:41 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.0906231826100.2767@localhost.localdomain> (raw)
In-Reply-To: <1245774218.14443.120.camel@bri1004.bri.st.com>
On Tue, 23 Jun 2009, Pawel MOLL wrote:
> Folks,
>
> A quick question about the interrupt management... (the story takes
> place in kernel/irq/chip.c ;-)
>
> Here we have the default_enable():
>
> static void default_enable(unsigned int irq)
> {
> struct irq_desc *desc = irq_to_desc(irq);
>
> desc->chip->unmask(irq);
> desc->status &= ~IRQ_MASKED;
> }
>
> It calls chip->unmask(), which absolutely makes sense...
>
> The default_disable(), however, is not symmetric:
>
> static void default_disable(unsigned int irq)
> {
> }
>
> Is there any reason why it shouldn't call chip->mask()?
>
> I'll be more then happy to prepare a patch doing so, but maybe it's a
> feature not a bug and I'm just missing something?
Yup, it's a feature: delayed irq disable.
Disabling irqs on the hardware level can be expensive. So we keep them
enabled and mark the irq as disabled. When an interrupt comes in
during that time then we disable the irq on the hardware level for
real and note internaly that it happened. On enable we replay the
interrupt so nothing is lost. That replay can be in hardware or in
software.
Thanks,
tglx
prev parent reply other threads:[~2009-06-23 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 16:23 Pawel MOLL
2009-06-23 16:31 ` Thomas Gleixner [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=alpine.LFD.2.00.0906231826100.2767@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pawel.moll@st.com \
/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®