From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Liam Girdwood <lrg@ti.com>,
linux-kernel@vger.kernel.org,
Samuel Ortiz <sameo@linux.intel.com>,
Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH 3/3] regmap: enhance regmap-irq to handle 1 IRQ feeding n chips
Date: Wed, 1 Aug 2012 12:41:42 +0100 [thread overview]
Message-ID: <20120801114142.GN11892@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <501867CC.50909@wwwdotorg.org>
On Tue, Jul 31, 2012 at 05:18:36PM -0600, Stephen Warren wrote:
> I don't think it's appropriate to put this support into the IRQ core.
> The main issue is that all the handlers for any shared wired-or
> interrupt line have to be registered before the IRQ is enabled, to avoid
> some initially active interrupt continually firing before the IRQ is
> enabled. Co-ordinating this when the wired-or line is on a board outside
> a device driver rather than internal to a chip and one device driver is
> a bit more than the IRQ core should probably be doing, hence I imagine
> why it doesn't support it.
No, that's not the issue at all - none of the above is at all different
to any other shared interrupt and obviously we support shared IRQs quite
happily (we wouldn't run on a good chunk of PCs if we didn't). Shared
interrupts do require the hardware design not be insane but generally
hardware engineers do manage to get that right.
We don't support this for threaded IRQs due to thorny synchronisation
issues in fast paths.
> Co-ordinating this setup where all the sources of the wired-or are in
> one chip seems to belong to the chip driver, which is where my patch did
> this.
Well, no. It did this by having a piece of framework code add a round
robin irq_chip (essentially a shared threaded IRQ) layered on top of the
existing regmap-irq code which had nothing to do with the rest of that
code. There's nothing at all about that framework code which is at all
specific to regmap-irq, it just calls a series of sub IRQs every time
the primary IRQ goes off.
This isn't the chip driver that's doing things, it's the regmap-irq
code. With the current round robin implementation there's no reason for
regmap to implement it, other things can quite happily do the same thing.
Having a regmap helper which used a generic facility would be reasonable
but the actual demux is a generic thing.
[Suggestion to not bounce back into the IRQ core]
> but it seems a little hokey to short-circuit the IRQ core; it would
> prevent execution of any statistics gathering or stuck interrupt
> handling that handle_nested_irq() might do for example.
This seems like a better approach if doing things entirely in regmap. I
can't see any impact on any of the IRQ core features here, we're always
going to call each of the sub IRQs exactly once for each call to the IRQ
handler and the stuck IRQ code is still going to identify the same set
of real IRQs as stuck.
> Now, if we made each child regmap_irq not be its own IRQ domain or
> irq_chip, but simply had one top-level domain/chip that aggregated them,
> that argument would be moot. However, that top-level domain/chip would
> become rather complex and just end up doing a bunch of demultiplexing
> code that's not needed if we do it like in my patch...
That demultiplexing seems excessively complex, yes.
next prev parent reply other threads:[~2012-08-01 11:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 19:01 [PATCH 1/3] regmap: fix some error messages to take account of irq_reg_stride Stephen Warren
2012-07-27 19:01 ` [PATCH 2/3] regmap: implement irq chip suspend/resume operations Stephen Warren
2012-07-29 21:04 ` Mark Brown
2012-07-30 17:10 ` Stephen Warren
2012-07-30 17:38 ` Mark Brown
2012-07-31 19:25 ` Stephen Warren
2012-08-01 13:56 ` Mark Brown
2012-07-27 19:01 ` [PATCH 3/3] regmap: enhance regmap-irq to handle 1 IRQ feeding n chips Stephen Warren
2012-07-29 20:36 ` Mark Brown
2012-07-30 17:00 ` Stephen Warren
2012-07-30 17:25 ` Mark Brown
2012-07-31 23:18 ` Stephen Warren
2012-08-01 11:41 ` Mark Brown [this message]
2012-08-01 13:56 ` [PATCH 1/3] regmap: fix some error messages to take account of irq_reg_stride Mark Brown
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=20120801114142.GN11892@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=sameo@linux.intel.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.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;
as well as URLs for NNTP newsgroup(s).