mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Tony Luck <tony.luck@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Christoph Hellwig <hch@infradead.org>,
	linux-alpha@vger.kernel.org, linux-cris-kernel@axis.com,
	Haavard Skinnemoen <hskinnemoen@atmel.com>,
	linux-ia64@vger.kernel.org,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Hirokazu Takata <takata@linux-m32r.org>,
	Greg Ungerer <gerg@uclinux.org>, Jeff Dike <jdike@addtoit.com>,
	linux-parisc@vger.kernel.org, Chris Zankel <chris@zankel.net>,
	linux-arch@vger.kernel.org
Subject: Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
Date: Mon, 27 Sep 2010 20:01:26 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1009271953390.2416@localhost6.localdomain6> (raw)
In-Reply-To: <AANLkTikVHO9DmyTX==CwViDK1rP0masBwjMakHZ0U=kZ@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1580 bytes --]



On Mon, 27 Sep 2010, Tony Luck wrote:

> On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@linutronix.de> 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

  reply	other threads:[~2010-09-27 18:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 18:14 Thomas Gleixner
2010-09-08 18:51 ` James Bottomley
2010-09-08 19:34   ` Thomas Gleixner
2010-09-08 20:35     ` James Bottomley
2010-09-08 21:35       ` Thomas Gleixner
2010-09-08 20:28   ` Mike Frysinger
2010-09-08 18:58 ` Kyle McMartin
2010-09-08 20:36   ` Luck, Tony
2010-09-09  7:10 ` Mikael Starvik
2010-09-09 13:44   ` Dialup Jon Norstog
2010-09-09  7:21 ` Greg Ungerer
2010-09-09 14:09   ` Kyle McMartin
2010-09-09 23:17     ` Greg Ungerer
2010-09-27 17:36 ` Tony Luck
2010-09-27 18:01   ` Thomas Gleixner [this message]
2010-09-27 18:39     ` Luck, Tony
2010-09-27 18:49       ` Thomas Gleixner
2010-09-27 19:01         ` Luck, Tony
2010-09-29  0:46           ` Kyle McMartin
2010-09-29  4:55             ` Luck, Tony
2010-09-29 14:38               ` Kyle McMartin
2010-09-27 19:48 ` richard -rw- weinberger
2010-09-27 19:54   ` Thomas Gleixner
2010-09-30  1:26 ` Kyle McMartin
2010-09-30  2:41   ` Kyle McMartin

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.1009271953390.2416@localhost6.localdomain6 \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=gerg@uclinux.org \
    --cc=hch@infradead.org \
    --cc=hskinnemoen@atmel.com \
    --cc=jdike@addtoit.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=takata@linux-m32r.org \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ysato@users.sourceforge.jp \
    /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®