From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] of/platform: Fix no irq domain found errors when populating interrupts
Date: Sat, 23 Nov 2013 08:32:40 -0800 [thread overview]
Message-ID: <20131123163240.GW5928@atomide.com> (raw)
In-Reply-To: <CAL_JsqKV7K+QdLHS+3LtfcVx5Dpc7n6A8UwwNWKBP33Gs19c8g@mail.gmail.com>
* Rob Herring <robherring2@gmail.com> [131123 07:43]:
> On Fri, Nov 22, 2013 at 7:50 PM, Tony Lindgren <tony@atomide.com> wrote:
> > * Tony Lindgren <tony@atomide.com> [131122 17:16]:
> >> * Tony Lindgren <tony@atomide.com> [131122 17:09]:
> >> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [131122 16:56]:
> >> > > On Fri, Nov 22, 2013 at 04:43:35PM -0800, Tony Lindgren wrote:
> >> > > > + /* See of_device_resource_notify for populating interrupts */
> >> > > > + for (i = 0; i < num_irq; i++, res++) {
> >> > > > + res->flags = IORESOURCE_IRQ;
> >> > > > + res->start = -EPROBE_DEFER;
> >> > > > + res->end = -EPROBE_DEFER;
> >> > >
> >> > > NAK. Definitely a bad idea to start introducing magic values other into
> >> > > resources. Please don't do this.
> >> >
> >> > Do you have any better ideas on how to sort out this issue then?
> >>
> >> I guess we could allocate all the resources lazily here, I'll take a look
> >> at that.
> >
> > Here's a version that allocates the resources lazily with the notifier.
> > Seems to boot, need to play with it a bit more though to make sure we're
> > not overwriting resources for any legacy devices.
>
> Have you seen Thierry's series[1]? While your approach is certainly
> more concise, it seems like a work-around for the problem. I don't
> think a notifier is the right long term solution.
OK cool. I think we can fix the $Subject bug first without making all
those changes, then do the rest of the reorg for v3.14.
The bug is that we try to populate IRQ resources at a wrong time
when they may not exist.
Based on a quick look it seems we could combine Thierry's addition
of the new function of_platform_probe(struct platform_device *pdev)
and use that to allocate all resources at driver probe time like my
patch is doing. And then there's no need for the notifier.
Regards,
Tony
> [1] http://www.spinics.net/lists/arm-kernel/msg274110.html
next prev parent reply other threads:[~2013-11-23 16:32 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-23 0:43 [PATCH] of/platform: Fix no irq domain found errors when populating interrupts Tony Lindgren
2013-11-23 0:55 ` Russell King - ARM Linux
2013-11-23 1:08 ` Tony Lindgren
2013-11-23 1:15 ` Tony Lindgren
2013-11-23 1:50 ` Tony Lindgren
2013-11-23 15:42 ` Rob Herring
2013-11-23 16:32 ` Tony Lindgren [this message]
2013-11-25 9:34 ` Thierry Reding
2013-11-25 19:46 ` Tony Lindgren
2013-11-24 21:27 ` Grant Likely
2013-12-10 3:39 ` Paul Walmsley
2013-12-30 22:10 ` Paul Walmsley
2013-12-31 16:33 ` Rob Herring
2014-01-06 23:41 ` Paul Walmsley
2014-01-08 1:19 ` Tony Lindgren
2014-01-08 12:51 ` [PATCH] driver-core: platform: Resolve DT interrupt references late Thierry Reding
2014-01-08 13:41 ` Arnd Bergmann
2014-01-08 14:55 ` Thierry Reding
2014-01-08 15:11 ` Arnd Bergmann
2014-01-08 15:58 ` Thierry Reding
2014-01-08 16:25 ` Arnd Bergmann
2014-01-08 19:59 ` Thierry Reding
2014-01-08 20:09 ` Arnd Bergmann
2014-01-08 20:24 ` Thierry Reding
2014-01-08 21:01 ` Arnd Bergmann
2014-01-08 16:40 ` Tony Lindgren
2014-01-08 19:28 ` Thierry Reding
2014-01-08 21:43 ` Tony Lindgren
2013-11-23 1:07 ` [PATCH] of/platform: Fix no irq domain found errors when populating interrupts Tony Lindgren
2013-11-24 21:36 ` Grant Likely
2013-11-25 9:25 ` Thierry Reding
[not found] ` < 20131125094954.GF22043@ulmo.nvidia.com>
2013-11-25 9:49 ` Thierry Reding
2013-11-25 19:50 ` Tony Lindgren
2013-11-27 15:56 ` Grant Likely
2013-11-28 15:46 ` Thierry Reding
2013-12-11 13:45 ` Grant Likely
2013-12-11 15:12 ` Thierry Reding
2013-12-11 16:43 ` Tony Lindgren
2013-11-27 15:54 ` Grant Likely
2013-11-27 21:53 ` Tony Lindgren
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=20131123163240.GW5928@atomide.com \
--to=tony@atomide.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 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).