From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: genirq vs. fastack
Date: Wed, 31 May 2006 11:52:40 +1000 [thread overview]
Message-ID: <1149040361.766.10.camel@localhost.localdomain> (raw)
Hi Thomas, Ingo !
There is one bit in genirq that I don't get (and doesn't work for me),
it's the "fastack" handler. It does:
out:
if (!(desc->status & IRQ_DISABLED))
desc->chip->ack(irq);
else
desc->chip->mask(irq);
Which doesn't at all match the needs of things like XICS or MPIC and
thus I wonder if it does also make sense for controllers for which you
intend it. It should just be:
desc->chip->end(irq);
Basically, those controllers will have 1) already acke'd the interrupt
by the time you get the vector (the act of getting the vector does the
ack), 2) will use a processor priority mecanism to handle non-reentrency
of an interrupt thus mask/unmask is completely orthogonal to handling of
interrupts and thus there is no need to do anything about mask/unmask in
the handler, 3) all we need is to do an "EOI" (end of interrupt) at the
end of the handling, which is what is done logically in the end()
handler.
Thus this proposed patch:
Index: linux-work/kernel/irq/chip.c
===================================================================
--- linux-work.orig/kernel/irq/chip.c 2006-05-31 11:26:45.000000000 +1000
+++ linux-work/kernel/irq/chip.c 2006-05-31 11:48:19.000000000 +1000
@@ -325,10 +325,7 @@ handle_fastack_irq(unsigned int irq, str
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
out:
- if (!(desc->status & IRQ_DISABLED))
- desc->chip->ack(irq);
- else
- desc->chip->mask(irq);
+ desc->chip->end(irq);
spin_unlock(&desc->lock);
}
next reply other threads:[~2006-05-31 1:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-31 1:52 Benjamin Herrenschmidt [this message]
2006-05-31 8:38 ` genirq vs. fastack Thomas Gleixner
2006-05-31 9:11 ` Benjamin Herrenschmidt
2006-05-31 10:19 ` [patch, -rc5-mm1] genirq: add chip->eoi(), fastack -> fasteoi Ingo Molnar
2006-05-31 21:23 ` Benjamin Herrenschmidt
2006-05-31 21:30 ` Ingo Molnar
2006-05-31 21:46 ` Benjamin Herrenschmidt
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=1149040361.766.10.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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