mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@linaro.org>
To: Thierry Reding <thierry.reding@gmail.com>,
	Rob Herring <rob.herring@calxeda.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Russell King <linux@arm.linux.org.uk>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org,
	sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 08/10] of/platform: Resolve interrupt references at probe time
Date: Thu, 24 Oct 2013 17:37:49 +0100	[thread overview]
Message-ID: <20131024163749.68D01C403B6@trevor.secretlab.ca> (raw)
In-Reply-To: <20131015232436.19F61C40099@trevor.secretlab.ca>

On Wed, 16 Oct 2013 00:24:36 +0100, Grant Likely <grant.likely@linaro.org> wrote:
> On Wed, 18 Sep 2013 15:24:50 +0200, Thierry Reding <thierry.reding@gmail.com> wrote:
> > Interrupt references are currently resolved very early (when a device is
> > created). This has the disadvantage that it will fail in cases where the
> > interrupt parent hasn't been probed and no IRQ domain for it has been
> > registered yet. To work around that various drivers use explicit
> > initcall ordering to force interrupt parents to be probed before devices
> > that need them are created. That's error prone and doesn't always work.
> > If a platform device uses an interrupt line connected to a different
> > platform device (such as a GPIO controller), both will be created in the
> > same batch, and the GPIO controller won't have been probed by its driver
> > when the depending platform device is created. Interrupt resolution will
> > fail in that case.
> 
> What is the reason for all the rework on the irq parsing return values?
> A return value of '0' is always an error on irq parsing, regardless of
> architecture even if NO_IRQ is defined as -1. I may have missed it, but
> I don't see any checking for specific error values in the return paths
> of the functions.
> 
> If the specific return value isn't required (and I don't think it is),
> then you can simplify the whole series by getting rid of the rework
> patches.

I've not heard back about the above, but I've just had a conversation
with Rob about what to do here. The problem that I have is that it makes
a specific return code need to traverse several levels of function calls
and have a meaning come out the other end. It becomes difficult to
figure out where that code actually comes from when reading the code.
That's more of a gut-feel reaction rather than pointing out specifics
though.

The other thing that makes me nervous how invasive the series is.

However, even with saying all of the above, I'm not saying outright no.
I want to get this feature in. It is obviously needed and I'll even
merge the patches piecemeal as the look ready (I've already merged 2).
Regardless, the current series needs to be reworked. It conflicts with
the other IRQ rework that I've already put into my tree. The best thing
to do would probably be respin it against my current tree and repost.
I'll take a fresh look then.... In the mean time, anything you can do to
/sanely/ reduce the impact will probably help.  :-)

g.

  parent reply	other threads:[~2013-10-24 16:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 13:24 [PATCH v2 00/10] of/irq: Defer interrupt reference resolution Thierry Reding
2013-09-18 13:24 ` [PATCH v2 01/10] of/irq: Rework of_irq_count() Thierry Reding
2013-09-22 21:19   ` Rob Herring
2013-10-15 22:42     ` Grant Likely
2013-10-15 22:55     ` Grant Likely
2013-09-18 13:24 ` [PATCH v2 02/10] of/irq: Use irq_of_parse_and_map() Thierry Reding
2013-09-22 21:17   ` Rob Herring
2013-09-18 13:24 ` [PATCH v2 03/10] irqdomain: Introduce __irq_create_mapping() Thierry Reding
2013-09-18 13:24 ` [PATCH v2 04/10] irqdomain: Return errors from irq_create_of_mapping() Thierry Reding
2013-09-18 14:23   ` Ralf Baechle
2013-09-22 21:14   ` Rob Herring
2013-09-23  8:13     ` Thierry Reding
2013-10-15 23:01       ` Grant Likely
2013-09-18 13:24 ` [PATCH v2 05/10] of/irq: Introduce __irq_of_parse_and_map() Thierry Reding
2013-09-18 13:24 ` [PATCH v2 06/10] of/irq: Return errors from of_irq_to_resource() Thierry Reding
2013-09-18 13:24 ` [PATCH v2 07/10] of/irq: Propagate errors in of_irq_to_resource_table() Thierry Reding
2013-09-18 14:23   ` Ralf Baechle
2013-09-22 21:08   ` Rob Herring
2013-09-23  8:36     ` Thierry Reding
2013-09-18 13:24 ` [PATCH v2 08/10] of/platform: Resolve interrupt references at probe time Thierry Reding
2013-10-15 23:24   ` Grant Likely
2013-10-16  8:20     ` Thierry Reding
2013-10-24 16:37     ` Grant Likely [this message]
2013-10-25  7:35       ` Thierry Reding
2013-09-18 13:24 ` [PATCH v2 09/10] of/i2c: " Thierry Reding
2013-09-18 13:24 ` [PATCH v2 10/10] gpio: tegra: Use module_platform_driver() Thierry Reding

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=20131024163749.68D01C403B6@trevor.secretlab.ca \
    --to=grant.likely@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ralf@linux-mips.org \
    --cc=rob.herring@calxeda.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    /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

all inboxes | Powered by JetHome®