Re: [PATCH 6/7] mfd: twl4030-irq: set irq nested flag

From: Felipe Contreras
Date: Mon Dec 12 2011 - 12:58:33 EST


On Thu, Jun 30, 2011 at 12:51 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> threads from twl4030's children will be called
> nested in the context of the demultiplexing
> handler on twl4030-irq.c.
>
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
> Âdrivers/mfd/twl4030-irq.c | Â 11 ++++++-----
> Â1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
> index 1b9ab2f..ff16e9c 100644
> --- a/drivers/mfd/twl4030-irq.c
> +++ b/drivers/mfd/twl4030-irq.c
> @@ -304,7 +304,7 @@ static irqreturn_t handle_twl4030_pih(int irq, void *devid)
> Â Â Â Â Â Â Â Â Â Â Â Âpih_isr;
> Â Â Â Â Â Â Â Â Â Â Â Âpih_isr >>= 1, module_irq++) {
> Â Â Â Â Â Â Â Âif (pih_isr & 0x1)
> - Â Â Â Â Â Â Â Â Â Â Â generic_handle_irq(module_irq);
> + Â Â Â Â Â Â Â Â Â Â Â handle_nested_irq(module_irq);

But handle_nested_irq calls action->thread_fn, which is NULL for the
sih handlers that are set-up below; handle_twl4030_sih will never be
called.

> Â Â Â Â}
>
> Â Â Â Âreturn IRQ_HANDLED;
> @@ -596,9 +596,7 @@ static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc)
> Â Â Â Âint isr;
>
> Â Â Â Â/* reading ISR acks the IRQs, using clear-on-read mode */
> - Â Â Â local_irq_enable();
> Â Â Â Âisr = sih_read_isr(sih);
> - Â Â Â local_irq_disable();

But handle_twl4030_sih is still not nested.

Fortunately, Neil Brown already fixed the issues in this patch by
making handle_twl4030_sih truly nested:
http://article.gmane.org/gmane.linux.kernel/1220708

Cheers.

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