mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Ben Dooks <ben@fluff.org.uk>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: Fwd: [RFC] IRQ type flags
Date: Mon, 7 Nov 2005 18:10:10 +0000	[thread overview]
Message-ID: <20051107181010.GB28605@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20051107124220.GA16281@home.fluff.org>

On Mon, Nov 07, 2005 at 12:42:20PM +0000, Ben Dooks wrote:
> On Sun, Nov 06, 2005 at 08:40:12AM +0000, Russell King wrote:
> > I haven't had any feedback on this patch.  akpm - can you add it to -mm
> > please?  Here's the sign-off for it, thanks.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > 
> > ----- Forwarded message from Russell King <rmk+lkml@arm.linux.org.uk> -----
> > Date:	Fri, 28 Oct 2005 22:57:47 +0100
> > From:	Russell King <rmk+lkml@arm.linux.org.uk>
> > To:	Linux Kernel List <linux-kernel@vger.kernel.org>
> > Subject: [RFC] IRQ type flags
> > 
> > Hi,
> > 
> > Some ARM platforms have the ability to program the interrupt controller
> > to detect various interrupt edges and/or levels.  For some platforms,
> > this is critical to setup correctly, particularly those which the
> > setting is dependent on the device.
> > 
> > Currently, ARM drivers do (eg) the following:
> > 
> > 	err = request_irq(irq, ...);
> > 
> > 	set_irq_type(irq, IRQT_RISING);
> > 
> > However, if the interrupt has previously been programmed to be level
> > sensitive (for whatever reason) then this will cause an interrupt
> > storm.
> 
> surely, thats the other way around, going from edge to level.

No.  How can an edge triggered interrupt possibly cause a storm?

If the interrupt signal is at logic '0' and it was previously
configured for a low level to interrupt, when you call request_irq()
with your handler, the interrupt will be enabled.

Because it's level sensitive, it'll immediately interrupt, and
the handler will be invoked.  When the handler returns, the interrupt
signal will still be at logic '0' so it's still active.  So you
immediately get another interrupt and the handler will be re-invoked.
Repeat infinitely.

So it is exactly as I describe.

> How about making these compatible with the
> triggers compatible with the flags from
> include/linux/ioport.h definitions for the
> IRQ resource (IORESOURCE_IRQ_*). 

We could do, but I took the set_irq_type() implementation. 8)  We
could change both to conform.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-11-07 18:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06  8:40 Russell King
2005-11-06 22:41 ` Alan Cox
2005-11-06 22:16   ` Russell King
2005-11-06 22:59     ` Alan Cox
2005-11-06 22:42       ` Russell King
2005-11-06 23:33         ` Benjamin Herrenschmidt
2005-11-07  0:03         ` Alan Cox
2005-11-07  3:40           ` Benjamin Herrenschmidt
2005-11-07  8:51           ` Russell King
2005-11-07 12:42 ` Ben Dooks
2005-11-07 18:10   ` Russell King [this message]
2005-12-12 11:47 ` Russell King
2005-12-12 12:01   ` Russell King
2005-12-13 14:49   ` Kumar Gala
2005-12-15 14:44     ` Russell King
2005-12-14 15:48   ` Fwd: " Zwane Mwaikambo

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=20051107181010.GB28605@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=ben@fluff.org.uk \
    --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®