irqchip: sirfsoc: Question about SIRFSOC_NUM_IRQS setting
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 callssirfsoc_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.
PS. In initial commit 02c981c07bc95ac1e "ARM: CSR: Adding CSR SiRFprimaII board support" SIRFSOC_INTENAL_IRQ_END is 59.
Regards,
Axel
Quoted 10 lines · Axel Lin
irq_setup_generic_chip()setup max. 32 interrupts starting fromgc->irq_base.
sirfsoc_irq_init()
->sirfsoc_alloc_gc()-> irq_setup_generic_chip()In
sirfsoc_irq_init(), current code callssirfsoc_alloc_gc(base + 4, 32, SIRFSOC_NUM_IRQS - 32); //Note,SIRFSOC_NUM_IRQSis 128So I'm wondering if
SIRFSOC_NUM_IRQSsetting 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