From: ludovic.desroches@atmel.com (ludovic.desroches)
To: linux-arm-kernel@lists.infradead.org
Subject: How to use linear mapping without DT?
Date: Mon, 18 Jun 2012 14:10:24 +0200 [thread overview]
Message-ID: <4FDF1AB0.5@atmel.com> (raw)
In-Reply-To: <20120616023507.GC29663@S2101-09.ap.freescale.net>
Le 06/16/2012 04:35 AM, Shawn Guo a ?crit :
> On Fri, Jun 15, 2012 at 06:32:29PM +0200, ludovic.desroches wrote:
>> I've seen your patch series and I am wondering what is the
>> difference between these two solutions:
>> - not using nr_irqs: you will have NR_IRQS_LEGACY irqdescs allocated
>> and you will allocate the irqdescs for your controller just after by
>> calling irq_alloc_descs so you will have to manage the
>> NR_IRQS_LEGACY offset.
>> - using nr_irqs: you will have all your irqdescs allocated and won't
>> have to manage the NR_IRQS_LEGACY offset.
>>
> First of all, NR_IRQS_LEGACY shifting is a good thing we are actually
> looking for because we want to reserve virq number 0 for no-interrupt
> case. [1]
I don't think it's an issue for legacy domain since virq number 0 is
ignored.
>
> Secondly, with .nr_irqs approach, you will have to somehow maintain
> irq_base for each irqchip, which is needed when adding legacy domain.
> Calling irq_alloc_descs will just return you the irq_base.
>
> Lastly, irq_alloc_descs approach can save irqdesc than .nr_irq in some
> cases, where not all the irqchips get instantiated for every single
> boot. That's said, .nr_irqs has to be set the possible maximum numbers
> for the machine, while some irqchips, e.g. peripheral/device inside
> ones, are not always instantiated. irq_alloc_descs approach will save
> irqdescs for such cases.
Of course it makes sense.
Thanks for these explanations. I'll correct my patches to use the
NR_IRQS_LEGACY shifting instead of using nr_irqs.
Regards
Ludovic
prev parent reply other threads:[~2012-06-18 12:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 9:54 How to use linear mapping without DT? ludovic.desroches
2012-06-15 16:01 ` Shawn Guo
2012-06-15 16:07 ` Mark Brown
2012-06-15 16:32 ` ludovic.desroches
2012-06-16 2:35 ` Shawn Guo
2012-06-18 12:10 ` ludovic.desroches [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=4FDF1AB0.5@atmel.com \
--to=ludovic.desroches@atmel.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).