public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] driver-core: platform: Resolve DT interrupt references late
Date: Wed, 08 Jan 2014 14:41:19 +0100	[thread overview]
Message-ID: <4589157.TquA4Q59fC@wuerfel> (raw)
In-Reply-To: <1389185477-507-1-git-send-email-treding@nvidia.com>

On Wednesday 08 January 2014 13:51:17 Thierry Reding wrote:
> When devices are probed from the device tree, any interrupts that they
> reference are resolved at device creation time. This causes problems if
> the interrupt provider hasn't been registered yet at that time, which
> results in the interrupt being set to 0.

Thanks for looking at this problem, it has bothered a lot of people
for a long time. I'm sorry I wasn't there for the discussion in November,
but when it came up before, I suggested a different solution that
apparently didn't get implemented.

> Note that this patch is the easy way out to fix a large part of the
> problems for now. A more proper solution for the long term would be to
> transition drivers to an API that always resolves resources of any kind
> (not only interrupts) at probe time.
> 
> For some background and discussion on possible solutions, see:
> 
> 	https://lkml.org/lkml/2013/11/22/520

I hope I read this thread correctly, sorry if I missed an important
part. My idea was to add the code not in platform_get_irq() but add
the resource in platform_drv_probe(), and just bail out with
-EPROBE_DEFER there if necessary.

We could then skip adding the resources at device creation time.
Is this something you already plan to do later, or is there a reason
it wouldn't work?

In the meantime, I don't see anything with your patch, but it also
wouldn't hurt to do it now if it solves all the problems.

	Arnd

  reply	other threads:[~2014-01-08 13:41 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 [this message]
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=4589157.TquA4Q59fC@wuerfel \
    --to=arnd@arndb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox