Re: How to use linear mapping without DT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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]

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.

Regards,
Shawn

[1] http://thread.gmane.org/gmane.linux.kernel.next/18991/focus=10108


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter