Re: [BUG somewhere] 2.6.0-test8 irq.c, IRQ_INPROGRESS ?

From: Linus Torvalds
Date: Thu Oct 23 2003 - 09:32:46 EST



On Thu, 23 Oct 2003, Mikael Pettersson wrote:
>
> It seems 2.4.23-pre8 included something like this apparently broken
> change (see diff from -pre7 below). Should it be reverted?

No, that one is correct. IRQ_INPROGRESS should indeed be cleared when the
first handler is installed. It's only clearing it at enable_irq() that is
wrong.

Also, the "disable_irq()" function _should_ look something like this:

void disable_irq(unsigned int irq)
{
irq_desc_t *desc = irq_desc + irq;
disable_irq_nosync(irq);
if (desc->action)
synchronize_irq(irq);
}

ie it should only do synchronize_irq() if a handler exists. That fixes a
potential problem with drivers doing multiple disable_irq()/enable_irq()
while no handler has been assigned yet.

Linus

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