Re: [PATCH] Fix shared interrupt handling of SA_INTERRUPT andSA_SAMPLE_RANDOM

From: Andrew Morton
Date: Wed Aug 25 2004 - 15:53:45 EST


Takashi Iwai <tiwai@xxxxxxx> wrote:
>
> Anyway, suppressing the unnecessary call of add_interrupt_randomness()
> should be still valid. The reduced patch is below.
>
>
> Takashi
>
> --- linux-2.6.8.1/arch/i386/kernel/irq.c-dist 2004-08-25 13:13:05.153227112 +0200
> +++ linux-2.6.8.1/arch/i386/kernel/irq.c 2004-08-25 13:13:34.760726088 +0200
> @@ -220,14 +220,16 @@ asmlinkage int handle_IRQ_event(unsigned
> struct pt_regs *regs, struct irqaction *action)
> {
> int status = 1; /* Force the "do bottom halves" bit */
> - int retval = 0;
> + int ret, retval = 0;
>
> if (!(action->flags & SA_INTERRUPT))
> local_irq_enable();
>
> do {
> - status |= action->flags;
> - retval |= action->handler(irq, action->dev_id, regs);
> + ret = action->handler(irq, action->dev_id, regs);
> + if (ret)
> + status |= action->flags;
> + retval |= ret;
> action = action->next;
> } while (action);
> if (status & SA_SAMPLE_RANDOM)

Shouldn't that be `if (ret == IRQ_HANDLED)'?

Probably I'll need to pass this to lots of other architecture maintainers
to make the same change. Please write a nice changelog so they understand
what your patch does.


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