[PATCH 6/6] ARM: nmk: update GPIO chained IRQ handler to use EOI in parent chip

Will Deacon will.deacon at arm.com
Wed Mar 2 10:33:20 EST 2011


Hi Thomas,

> Can you please take the time and explain me the difference of the
> following:
> 
> irqchip1.c
> 
> struct irq_chip1;
> 
> handle_primary_irq(int irq, struct irq_desc *desc)
> {
> 	chip->irq_ack();
> 	desc->demux();
> }
> 
> init()
> {
> 	irq_set_chip(PRIMARY_IRQ, &irq_chip1);
> 	irq_set_primary_handler(PRIMARY_IRQ, handle_primary_irq);
> }

I think with this approach you get the exact opposite problem; that
is the primary irq_chip doesn't know which IRQs are going to be
demuxed so it cannot know at init time which IRQs need their primary 
handler set. Is the idea that you set_primary_handler for all IRQs,
stash that in the descriptor somewhere and then replace handle_irq
with the primary handler when a demux handler is registered?

I guess I'm missing something here,

Cheers,

Will






More information about the linux-arm-kernel mailing list