linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: GIC: dont warn on pre-allocated IRQ descs
Date: Tue, 25 Sep 2012 16:55:56 -0500	[thread overview]
Message-ID: <5062286C.2080907@gmail.com> (raw)
In-Reply-To: <CACRpkdbJ828orOkXUnjuJh1iHA8Fe3AuuQRiQiYt0XFuvsWO=w@mail.gmail.com>

On 09/25/2012 03:08 PM, Linus Walleij wrote:
> On Tue, Sep 25, 2012 at 9:28 PM, Rob Herring <robherring2@gmail.com> wrote:
>> On 09/25/2012 02:19 PM, Linus Walleij wrote:
> 
>>> The allocation will succeed if the platform define .nr_irqs
>>> to 0 as an ideal device tree platform would do, but I think it
>>> is a bit thick to require that every platform that wants to
>>> use sparse IRQs must first or simultaneously switch to
>>> device tree. So make this to a simple pr_debug().
>>
>> It's not a matter of switching to DT or not. It is a matter of whether
>> an irq_chip allocates it's descriptors or not either directly or
>> indirectly via irqdomain.
> 
> Yeah OK that's true.
> 
>> The gic does this, so it is secondary
>> controllers which are the problem. A platform could allocate the ranges
>> needed for those controllers and leave a hole for the gic to allocate.
>>
>> A prefer to leave this so platforms get fixed.
> 
> Since the core kernel will allocate .nr_irqs on boot I guess
> this means you have to define the machine's .nr_irqs to
> zero or atleast < 16 so it doesn't overlap with those the
> GIC wants to use.

I believe the default of 0 causes NR_IRQS_LEGACY to be used which is
what we want.

> So I'll try that, and ad-hoc allocate descriptors needed
> above that range for drivers that are not yet allocating
> their descriptors ...
> 
> One question though: the real fix is obviously for all
> drivers exposing an irqchip to allocate its descriptors
> dynamically with exlicit alloc_descs() or using the
> linear irq domain instead of relying on pre-allocated
> descriptors.
> 
> Should we patch all drivers to spit out similar warnings
> then?

If you are bored with nothing else to do... Might as well fix them if
you can find them all.

Of course if you follow my previous suggestion, that would be a red flag
that you aren't fixing the irq_chip and we should reject the change. :)

Rob

> 
> Yours,
> Linus Walleij
> 

      reply	other threads:[~2012-09-25 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25 19:19 [PATCH] ARM: GIC: dont warn on pre-allocated IRQ descs Linus Walleij
2012-09-25 19:28 ` Rob Herring
2012-09-25 20:08   ` Linus Walleij
2012-09-25 21:55     ` 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=5062286C.2080907@gmail.com \
    --to=robherring2@gmail.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).