Re: irqchip: sirfsoc: Question about SIRFSOC_NUM_IRQS setting

From: Arnd Bergmann
Date: Thu Jul 04 2013 - 11:30:04 EST


On Thursday 04 July 2013, Axel Lin wrote:
> irq_setup_generic_chip() setup max. 32 interrupts starting from gc->irq_base.
>
> sirfsoc_irq_init()
> -> sirfsoc_alloc_gc()
> -> irq_setup_generic_chip()
>
> In sirfsoc_irq_init(), current code calls
> sirfsoc_alloc_gc(base + 4, 32, SIRFSOC_NUM_IRQS - 32); //Note, SIRFSOC_NUM_IRQS is 128
>
> So I'm wondering if SIRFSOC_NUM_IRQS setting is correct or not.

I think this is a result of the sirf marco platform getting added. Note
also the comment in

/* using legacy because irqchip_generic does not work with linear */
sirfsoc_irqdomain = irq_domain_add_legacy(np, SIRFSOC_NUM_IRQS, 0, 0,
&irq_domain_simple_ops, base);


With linux-3.11 this is no longer true: the generic irqchip now does
work with the linear domain, and the code can be simplified by
using irq_alloc_domain_generic_chips(), which also gets rid
of the SIRFSOC_NUM_IRQS constant.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/