- To: Tony Luck <tony.luck@xxxxxxxxx>
- Subject: Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Mon, 27 Sep 2010 20:01:26 +0200 (CEST)
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Hirokazu Takata <takata@xxxxxxxxxxxxxx>, Greg Ungerer <gerg@xxxxxxxxxxx>, Jeff Dike <jdike@xxxxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, Chris Zankel <chris@xxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx
- In-reply-to: <AANLkTikVHO9DmyTX==CwViDK1rP0masBwjMakHZ0U=kZ@xxxxxxxxxxxxxx>
- User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
On Mon, 27 Sep 2010, Tony Luck wrote:
> On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > The following architectures are still using __do_IRQ():
> >
> > alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>
> Thomas,
>
> I (belatedly) took a look at fixing ia64 ... but I've run into a small snag.
> The __do_IRQ() routine makes a call to:
>
> desc->chip->end(irq);
>
> while neither of the "handle_level_irq()" nor "handle_edge_irq()"
> functions do this.
>
> On ia64 iosapic_end_level_irq() call iosapic_eoi() for me. Without it
> my system hangs during boot (with some driver timeout complaining
> about dropped interrupts).
>
> Is the omission of desc->chip->end(irq); deliberate? In which case
> I need to find another place to call iosapic_eoi(). Or is it accidental?
No, it's deliberate. The solution is to use the correct flow handler
for your device. We have currently several flow handlers implemented:
handle_level_irq
{
if (chip->mask_ack)
chip->mask_ack()
else {
chip->mask();
if (chip->ack)
chip->ack();
}
....
chip->unmask();
}
handle_edge_irq
{
chip->ack()
...
}
handle_simple_irq
{
...
}
handle_fasteoi_irq
{
...
chip->eoi();
}
handle_percpu_irq
{
if (chip->ack)
chip->ack();
if (chip->eoi)
chip->eoi();
}
Note, that handle_percpu_irq does not take the irq_desc->lock.
So the trick is to select the matching handler and have separate irq
chip implementations if necessary.
Hope that helps.
Thanks,
tglx
[Netdev]
[Linux Wireless]
[Kernel Newbies]
[Security]
[Linux for Hams]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux Admin]
[Samba]
[Video 4 Linux]
[Linux Resources]