devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
Cc: Geert Uytterhoeven
	<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH] [RFC] OF: probe order dependency aware of_platform_populate
Date: Thu, 16 Apr 2015 09:32:13 -0500	[thread overview]
Message-ID: <CAL_JsqKAwfGtxpQVn8dbaKhVvBecjoiF9psYobGqn=oC+zS_jw@mail.gmail.com> (raw)
In-Reply-To: <552F9198.4030902-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>

On Thu, Apr 16, 2015 at 5:40 AM, Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org> wrote:
> On 04/15/2015 10:35 AM, Rob Herring wrote:
>> On Wed, Apr 15, 2015 at 9:17 AM, Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org> wrote:
>
>>> 2. Should DT-specific drivers not be using irq_of_parse_and_map()?
>>>    On probe failure irq_dispose_mapping() will be junking the mapping,
>>>    thus invalidating the irq assignment in the platform resource table,
>>>    which breaks platform drivers which might otherwise probe successfully.
>>
>> Generally no, they should not use irq_of_parse_and_map as we want
>> drivers to work with platform_data, DT, ACPI, or Bob's Firmware
>> Interface. I think most users are PPC drivers which don't have so much
>> of the probe ordering problems.
>
> Apologies for hijacking this thread for a moment.
>
> If of_device_alloc() creates the irq mapping, and no driver probes succeed,
> what is disposing the mapping?
>
> Similarly, if a platform driver fails its probe after platform_get_irq()
> what should dispose of that mapping?

The mapping is created by the irqchip init, not of_device_alloc or
platform_get_irq. Disposing would occur when the irqchip is hot
unplugged. Perhaps we could save some memory by also creating the
irqdesc when we probe. Of course, the resources set by of_device_alloc
would be stale if unplug happened, but platform_get_irq would be okay.
However, I think we don't reference count irqchips to prevent their
hot unplug while in use. GPIOs have similar hotplug issues and that is
being worked on.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2015-04-16 14:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 12:11 [PATCH] [RFC] OF: probe order dependency aware of_platform_populate Pantelis Antoniou
     [not found] ` <1418731891-24768-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-03-19 19:18   ` Grant Likely
     [not found]     ` <20150319191834.5346CC40A35-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2015-03-20 11:39       ` Pantelis Antoniou
     [not found]         ` <8E250936-B06C-40B4-8C34-557D2361CAF6-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-03-20 11:56           ` Grant Likely
2015-03-24 14:50           ` Geert Uytterhoeven
     [not found]             ` <CAMuHMdU=Zh00DnkAdAJBaAVn8LthYoRoGCVdFAhxQmWaEGHfkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-24 17:56               ` Pantelis Antoniou
     [not found]                 ` <1B3AF599-4A64-4FB0-BFB0-0C0544917C6C-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-03-30 13:27                   ` Geert Uytterhoeven
     [not found]                     ` <CAMuHMdWgAzkAJ-ix9NYc46yJRGPHCpmimOjF=HUYprxdgtzkaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-30 17:13                       ` Pantelis Antoniou
2015-04-02  2:38                       ` Grant Likely
     [not found]                         ` <20150402023803.E6A4DC4076D-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2015-04-02 15:40                           ` Pantelis Antoniou
2015-04-08  8:42                           ` Geert Uytterhoeven
     [not found]                             ` <CAMuHMdWVTsog2_9iyUEBWm-7xonvNibTTbOY5YxvpAhffUXdcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-08  9:16                               ` Pantelis Antoniou
     [not found]                                 ` <2B8BD326-8A21-45F3-8276-DF3B303B11D8-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-04-08 14:17                                   ` Rob Herring
     [not found]                                     ` <CAL_JsqKWp5RWr_T-+gD7hTiJiJMxq68pOR4zORL7SD2H_=JMfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-08 14:43                                       ` Geert Uytterhoeven
     [not found]                                         ` <CAMuHMdVsDx7g8jyU_nQZgG85o0huykb2EmBj4jskcuOuXXxiDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-08 16:36                                           ` Rob Herring
2015-04-08 13:40                               ` Rob Herring
     [not found]                                 ` <CAL_Jsq+9rYTvxX=Y6md5hgNhcBjbuM1m8Q3Y0gNkrV6yaDBskg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-13 10:02                                   ` Geert Uytterhoeven
2015-04-15 14:17                                   ` Peter Hurley
     [not found]                                     ` <552E7309.8020505-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-04-15 14:35                                       ` Rob Herring
     [not found]                                         ` <CAL_JsqJR4NFtwoUsPq3S7nyCBL6v+skarrXA+wvgzy-gR5fKWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-16 10:40                                           ` Peter Hurley
     [not found]                                             ` <552F9198.4030902-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-04-16 14:32                                               ` Rob Herring [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='CAL_JsqKAwfGtxpQVn8dbaKhVvBecjoiF9psYobGqn=oC+zS_jw@mail.gmail.com' \
    --to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.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).