Re: i810_audio.c cli/sti fix

Doug Ledford (dledford@redhat.com)
Sun, 28 Jul 2002 02:13:05 -0400


On Sat, Jul 27, 2002 at 01:35:42PM +0100, Alan Cox wrote:
> On Sat, 2002-07-27 at 10:10, Ingo Molnar wrote:
> > how about a disable_irq_all() and enable_irq_all() call, which would
> > disable every single interrupt source in the system? Sure it's a bit
> > heavyweight (it disables the timer interrupt too), but if some driver
> > **really** needs complete silence in the IRQ system then it might be
> > useful. It would roughly be equivalent to cli() and sti(), from the
> > hardirq disabling point of view. [it would not disable bottom halves.]
>
> For the precision needed I think a local irq disable and the lock the
> driver needs itself are sufficient, and the lock _irqsave will handle
> the IRQ bits

Well, to my belief the irq_all() stuff is overkill as Alan points out.
However, Alan also implies that during the init stage we should be holding
the card lock and using that to disable interrupts. I disagree with that
since we may already have other entry points looking at our card and we
don't want the card lock held until after it has been initted and is ready
for real use. So, I would leave it just like the patch to fix up the sti
usage left it.

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/