All of lore.kernel.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] ARM: nmk: update GPIO chained IRQ handler to use EOI in parent chip
Date: Wed, 2 Mar 2011 00:44:05 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1103020033080.2701@localhost6.localdomain6> (raw)
In-Reply-To: <20110301231432.GG27107@n2100.arm.linux.org.uk>

On Tue, 1 Mar 2011, Russell King - ARM Linux wrote:

> On Tue, Mar 01, 2011 at 10:29:37PM +0100, Thomas Gleixner wrote:
> > Can you please take the time and explain me the difference of the
> > following:
> 
> Can you please take the time to realise that sometimes the combination
> between the primary and secondary interrupt controller is so tied that
> this kind of thing can't happen?
> 
> Sometimes the secondary interrupt controller *must* mask the parent
> interrupt because it has no masking capability of its own.
> 
> Sometimes the secondary interrupt controller *must* cause the primary
> controller to ack the interrupt status *before* the secondary handler
> reads the status.
> 
> You can not say "the primary controller behaves like X so we always do
> X" because the action required on the primary is a combination of how
> the primary behaves *and* how the secondary behaves.
> 
> Consider for example an edge triggered interrupt connected to a secondary
> controller - yes, we have that combination.  When you read the secondary
> status register and clear those interrupts which are pending, the
> secondary controller resets to inactive its output.  If there's still
> pending interrupts, it re-asserts the output causing a new edge.
> 
> If your primary 'flow' handler were to acknowledge the interrupt *after*
> the demux, you'd lose interrupts.
> 
> However, if the very same primary interrupt controller is connected to
> a FPGA based oring of several interrupt sources, this has to ack before
> reading the status, read the status, process *all* interrupts, re-ack,
> re-read the status and repeat until the status register indicates no
> further interrupts are pending.
> 
> You can't deal with these two situations if you tie all the primary
> flow handling outside of the secondary demux handler.  And it's
> *wrong* to do so.  The behaviour required for the primary controller
> inherently depends on the secondary controller.
> 
> It may not be clean from a software point of view, but that's hardware
> for you, and we have to make this work.  You *can't* do that by
> separating the primary flow from the demux.

You are talking about very specific cases, where the demux handler is
tighlty integrated into the primary chip implementation. No discussion
about that. I do not want to change anything there. Period.

The problem which caused that discussion has nothing to do with the
above. It's about bog standard nested controllers which do not have a
tight coupling to the the primary chip. But changing the primary chip
from ack based to eoi based requires to touch multiple demux handlers
while a primary chip agnostic solution for these cases would avoid
that. W/O any negative side effects.

Your oddball FPGA example has nothing to do with that and can happily
use the existing model. Such a demux handler will never have to deal
with different primary chips.

Thanks,

	tglx

  reply	other threads:[~2011-03-01 23:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 13:33 [PATCH v2 0/6] Migrate GIC to fasteoi flow control Will Deacon
2011-02-28 13:33 ` [PATCH 1/6] ARM: gic: use handle_fasteoi_irq for SPIs Will Deacon
2011-02-28 13:33 ` [PATCH 2/6] ARM: omap: update GPIO chained IRQ handler to use EOI in parent chip Will Deacon
2011-02-28 13:33 ` [PATCH 3/6] ARM: tegra: " Will Deacon
2011-03-01 13:11   ` Sergei Shtylyov
2011-03-01 13:24     ` Will Deacon
2011-02-28 13:33 ` [PATCH 4/6] ARM: s5pv310: update IRQ combiner " Will Deacon
2011-03-01 13:12   ` Sergei Shtylyov
2011-02-28 13:33 ` [PATCH 5/6] ARM: msm: update GPIO chained IRQ handler " Will Deacon
2011-02-28 13:33 ` [PATCH 6/6] ARM: nmk: " Will Deacon
2011-02-28 14:03   ` Russell King - ARM Linux
2011-02-28 18:09     ` Will Deacon
2011-02-28 19:16       ` Thomas Gleixner
2011-02-28 21:44         ` Russell King - ARM Linux
2011-03-01 10:57           ` Thomas Gleixner
2011-03-01 20:19             ` Russell King - ARM Linux
2011-03-01 21:29               ` Thomas Gleixner
2011-03-01 23:14                 ` Russell King - ARM Linux
2011-03-01 23:44                   ` Thomas Gleixner [this message]
2011-03-01 23:50                     ` Russell King - ARM Linux
2011-03-02  8:53                 ` Russell King - ARM Linux
2011-03-02  9:25                   ` Thomas Gleixner
2011-03-02 19:17                     ` Russell King - ARM Linux
2011-03-02 20:44                       ` Thomas Gleixner
2011-03-02 15:33                 ` Will Deacon
2011-03-02 17:10                   ` Thomas Gleixner
2011-03-04 11:47                     ` 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.1103020033080.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.