[PATCH 6/6] ARM: nmk: update GPIO chained IRQ handler to use EOI in parent chip
From: Thomas Gleixner <hidden>
Date: 2011-03-02 17:10:20
From: Thomas Gleixner <hidden>
Date: 2011-03-02 17:10:20
On Wed, 2 Mar 2011, Will Deacon wrote:
Hi Thomas,quoted
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,
No, I missed that. Darn, yes this would need storing the primary_handler in some separate pointer or having a callback into the chip implementation to make this fully distangled. Grmbl. tglx