linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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: Mon, 25 Nov 2013 11:50:05 -0800	[thread overview]
Message-ID: <20131125195004.GS10023@atomide.com> (raw)
In-Reply-To: <20131125094954.GF22043@ulmo.nvidia.com>

* Thierry Reding <thierry.reding@gmail.com> [131125 01:51]:
> On Mon, Nov 25, 2013 at 10:25:50AM +0100, Thierry Reding wrote:
> > On Sun, Nov 24, 2013 at 09:36:51PM +0000, Grant Likely wrote:
> > > 
> > > I actually like the idea of completely allocating the resource structure
> > > but leaving some entries empty. However, I agree with rmk that putting
> > > garbage into a resource structure is a bad idea. What about changing the
> > > value of flags to 0 or some other value to be obviously an empty
> > > property and give the follow up parsing some context about which ones it
> > > needs to attempt to recalculate?
> > 
> > When I worked on this a while back I came to the same conclusion. It's
> > nice to allocate all the resources at once, because the number of them
> > doesn't change, only their actually values.
> 
> I should maybe add: one issue that was raised during review of my
> initial patch series was that we'll also need to cope with situations
> like the following:
> 
> 	1) device's interrupt parent is probed (assigned IRQ base X)
> 	2) device is probed (interrupt parent there, therefore gets
> 	   assigned IRQ (X + z)
> 	3) device in removed
> 	4) device's interrupt parent is removed
> 	5) device is probed (deferred because interrupt parent isn't
> 	   there)
> 	6) device's interrupt parent is probed (assigned IRQ base Y)
> 	7) device is probed, gets assigned IRQ (Y + z)
> 
> So not only do we have to track which resources are interrupt resources,
> but we also need to have them reassigned everytime the device is probed,
> therefore interrupt mappings need to be properly disposed and the values
> invalidated when probing is deferred or the device removed.
> 
> Having a dynamic list of properties all of a sudden doesn't sound like
> such a bad idea after all. It makes handling this kind of situation
> rather trivial, especially per-type lists. Those lists will be empty at
> first and populated during the first probe. When probing fails or when a
> device is unloaded, we dispose the mappings and empty the lists, so that
> subsequent probes will start from scratch. It certainly sounds like a
> bit of a waste of CPU cycles, but on the other hand it makes the code
> much simpler.

Looks like we cannot yet use devm_allocate, but that seems like a nice
solution in the long run. I just posted an updated patch to fix the $Subject
bug for the -rc cycle to this thread with more comments regarding dynamically
allocating the resources.

Regards,

Tony

  reply	other threads:[~2013-11-25 19:50 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
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 [this message]
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=20131125195004.GS10023@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).