Re: [PATCH] genirq: irq_chip->startup() usage in setup_irq andset_irq_chained handler

From: Pawel MOLL
Date: Tue Aug 26 2008 - 06:48:50 EST


> The second change is a significant semantic change. I wouldn't be
> surprised if I have cases that rely (or work around) the lack of
> startup() in set_irq_chained_handler(). I'll have to dbl check things
> next week.

Let me briefly explain my situation. I have a main interrupt controller
which provides startup() and unmask/mask() functions. The first one is
rather expensive (as the controller itself is... hmmm...
complicated ;-), the second - very cheap. And that is how I understand
the different "levels" of interrupt access - startup() should be called
once, somewhere during request_irq(), (un)masking may be used
frequently.

And one of the interrupt is generated by hardware PIO controller. The
idea was obvious - register a chained handler, which decodes the PIO
controller state and generates a interrupt, which number may be obtained
by gpio_to_irq(). Sounds simple, doesn't it? :-)

And in that moment the problem raised its ugly head - the interrupt
controller's startup() was never called for the PIO interrupt (as there
was no request_irq()), so the hardware wasn't configured properly and...
well... bad things were happening ;-)

So unless I totally misunderstood the meaning of irq_chip callbacks, I
believe the startup() should be called in set_irq_chained_handler().

Regards

PaweÅ



--
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/