Re: interrupt latency

Linus Torvalds (torvalds@transmeta.com)
12 Aug 1998 00:18:11 GMT


In article <19980812112341.A14787@caffeine.ix.net.nz>,
Chris Wedgwood <chris@cybernet.co.nz> wrote:
>
>That might be a requirement anyhow. I just tried running:
>
> main()
> {
> for(;;){
> __asm__("int $15");
> }
> }
>
>and it segfaults. I was hoping to see the interrupt counter for int
>15 increase, but alas, it does not, and my isr never gets called.
>
>I assume the only way I can induce the interrupt is from ring 0?

Yes. Allowing user mode programs to simulate hardware interrupts is a
major security misfeature (imagine somebody fooling with the system by
simulating lots of timer interrupts), and as such Linux doesn't allow it
on the x86 even though the CPU itself would be able to do it fairly
transparently.

(However, even if Linux _did_ allow it, you'd have to use

asm("int $15+32");

to get IRQ15 - the kernel offsets the interrupts from 8592 by 32 to make
sure that they don't clash with the internally generated x86
exceptions).

Linus

-
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.altern.org/andrebalsa/doc/lkml-faq.html