Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: gic: use handle_fasteoi_irq for SPIs
Date: Wed, 16 Feb 2011 20:20:17 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1102162008490.2701@localhost6.localdomain6> (raw)
In-Reply-To: <AANLkTimPDNv+2n2-QHtBq0X+Vkj21yQCPh8iKZkYjfqG@mail.gmail.com>

On Wed, 16 Feb 2011, Rabin Vincent wrote:
> On Wed, Feb 16, 2011 at 21:47, Will Deacon <will.deacon@arm.com> wrote:
> > Ah yes, thanks for the explanation. After looking at the plat-omap code
> > I finally understand what's going on and I can't help but feel that the
> > chained GPIO handlers are terminally broken! The generic irq chip high-level
> > handlers (handle_{edge,level}_irq for example) at least check to see if
> > the irq_chip functions are non-NULL before calling them.
> >
> > Ideally, the chained handler would be able to query the irq_chip to find
> > out what types of IRQ flow-control it supports and then assume that behaviour.
> 
> Thomas, suggestions on how best to handle this?  (Some of these chained
> handlers are the ones in plat-omap/gpio.c, plat-nomadik/gpio.c, and
> mach-s5pv310/irq-combiner.c.)

I'm not much of a fan of those chained handlers. They work fine, when
they are tied into the irq_chip implementation of a SoC where the
chained handler code is 1:1 related to that irq_chip.

Once you start assigning those handlers somewhere else or even using
the same handler for different underlying primary irq chips, then it's
a lost case and wreckage like this is just lurking around the corner.

The only sane way to deal with this is to install a regular interrupt
handler with request/setup_irq() and do the demultiplexing from
there. That way the demux handler does not have to worry about the
underlying primary chip at all. It does not have to worry whether this
chip uses level, fasteoi, edge or whatever. It just works.

The runtime overhead of going through that path is minimal and really
not worth the pain.

Thanks,

	tglx

  reply	other threads:[~2011-02-16 19:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 15:26 [PATCH] ARM: gic: use handle_fasteoi_irq for SPIs Will Deacon
2011-02-16 11:29 ` Rabin Vincent
2011-02-16 13:09   ` Will Deacon
     [not found]   ` <-4413647205110644369@unknownmsgid>
2011-02-16 14:05     ` Rabin Vincent
2011-02-16 16:17       ` Will Deacon
     [not found]       ` <146267380211262372@unknownmsgid>
2011-02-16 17:35         ` Rabin Vincent
2011-02-16 19:20           ` Thomas Gleixner [this message]
2011-02-17  9:17             ` Russell King - ARM Linux
2011-02-17  9:38               ` Thomas Gleixner
2011-02-17 10:19                 ` Russell King - ARM Linux
2011-02-17 10:43                   ` Thomas Gleixner
2011-02-17 10:56                     ` Russell King - ARM Linux
2011-02-17 11:21                       ` Thomas Gleixner
2011-02-17 16:26                         ` Will Deacon
2011-02-17 17:34                           ` Thomas Gleixner
2011-02-17 23:38                             ` Abhijeet Dharmapurikar
2011-02-18 11:29                               ` Will Deacon
2011-02-18 11:42                                 ` Thomas Gleixner
2011-02-18 12:09                                   ` Will Deacon
     [not found]                                   ` <-8083923411736601789@unknownmsgid>
2011-02-18 18:30                                     ` Colin Cross
2011-02-18 18:36                                       ` Santosh Shilimkar
2011-02-18 18:57                                       ` Will Deacon
  -- strict thread matches above, loose matches on Subject: below --
2011-02-10 12:29 Will Deacon

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.1102162008490.2701@localhost6.localdomain6 \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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