From: will.deacon@arm.com (Will Deacon)
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: Fri, 4 Mar 2011 11:47:50 -0000 [thread overview]
Message-ID: <000401cbda61$fd8759e0$f8960da0$@deacon@arm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1103021806560.2701@localhost6.localdomain6>
Hi Thomas,
> > > irqchip1.c
> > >
> > > struct irq_chip1;
> > >
> > > handle_primary_irq(int irq, struct irq_desc *desc)
> > > {
> > > chip->irq_ack();
> > > desc->demux();
> > > }
> > >
> > > init()
> > > {
> > > irq_set_chip(PRIMARY_IRQ, &irq_chip1);
> > > irq_set_primary_handler(PRIMARY_IRQ, handle_primary_irq);
> > > }
> >
> > I think with this approach you get the exact opposite problem; that
> > is the primary irq_chip doesn't know which IRQs are going to be
> > demuxed so it cannot know at init time which IRQs need their primary
> > handler set. Is the idea that you set_primary_handler for all IRQs,
> > stash that in the descriptor somewhere and then replace handle_irq
> > with the primary handler when a demux handler is registered?
> >
> > I guess I'm missing something here,
>
> No, I missed that. Darn, yes this would need storing the
> primary_handler in some separate pointer or having a callback into the
> chip implementation to make this fully distangled.
You could remove the need for pointer switching by having a bitmap
indicating the flow control supported by the primary chip and then
having a single primary handler implementation which checks the map.
Not especially nice but it does allow for demux handlers to exist
where they are sufficient.
Will
prev parent reply other threads:[~2011-03-04 11:47 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
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 [this message]
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='000401cbda61$fd8759e0$f8960da0$@deacon@arm.com' \
--to=will.deacon@arm.com \
--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.