Re: IRQF_DISABLED problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 26 Jul 2007, Matthew Wilcox wrote:
> 
> I noticed that we only look at the first action in the chain when
> determining whether to re-enable local interrupts during handle_IRQ_event.

You can't really share an interrupt handler that wants to run with 
interrupts on with one that wants to run with them off.

That said, I think the whole IRQF_DISABLED thing should go away. It is 
total legacy crud, methinks - it used to be SA_INTERRUPT, and it's always 
worked the way IRQF_DISABLED works now: it only looks at the first one in 
the chain.

> But we don't try to exclude sharing interrupts with mixtures of
> IRQF_DISABLED set and clear.

I think you should just consider it to be a "if you mix them, you get 
randomr results".

> I just tried to do that locally, and one
> of my USB ports disappears, because it shares an interrupt with qla2xxx
> which sets IRQF_DISABLED, and UHCI doesn't.

There really is no excuse for using IRQF_DISABLED unless you're something 
like a system device (like the timer interrupt or similar) and you have an 
exclusive irq handler. A SCSI driver almost certainly has no business 
doing it.

Generally, I would say that "IRQF_DISABLED | IRQF_SHARED" is an insane 
combination, but a quick grep shows that it's distressingly common.

The real fix is to just leave it as it is. It's always worked that way. 
IRQF_DISABLED basically cannot have any sane behaviour in the presense of 
mixing.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux