Re: 2us Interrupt latency's for Linux 2.0.xx

Andrea Arcangeli (arcangeli@mbox.queen.it)
Fri, 4 Sep 1998 19:13:39 +0000 (/etc/localtime)


On Fri, 4 Sep 1998, Etienne Lorrain wrote:

> For instance, this extract of 2.1.119
>drivers/sound/sb_common.c :
>--------------------------------------------------
>#if defined(__SMP__)
> /* Skip IRQ detection if SMP (doesn't work) */
> devc->irq_ok = 1;
>#else
> if (devc->major == 4 && devc->minor <= 11 ) /* Won't work */
> devc->irq_ok = 1;
> else
> {
> int n;
>
> for (n = 0; n < 3 && devc->irq_ok == 0; n++)
> {
> if (sb_dsp_command(devc, 0xf2)) /* Cause interrupt
> immediately */ {
> int i;
>
> for (i = 0; !devc->irq_ok && i < 10000; i++);
> }
> }
> if (!devc->irq_ok)
> printk(KERN_WARNING "sb: Interrupt test on IRQ%d failed -
> Probable IRQ conflict\n", devc->irq);
> else
> {
> DDB(printk("IRQ test OK (IRQ%d)\n", devc->irq));
> }
> }
>#endif /* __SMP__ */
>-------------------------------------------------------
>
> First, it should be something like
>#if defined(__APIC__)
>
> And the empty "for" will probably fail because it will not
> wait enought (anyway "i" is not declared volatile, so a

i has not to be declared volatile, is irq_ok that should be declared
volatile.

Andrea[s] Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html