Re: interrupt latency

Richard B. Johnson (root@chaos.analogic.com)
Wed, 12 Aug 1998 08:45:32 -0400 (EDT)


On Wed, 12 Aug 1998, Chris Wedgwood wrote:

> On Tue, Aug 11, 1998 at 09:05:06AM -0400, Richard B. Johnson wrote:
>
> > That's not how I would do it. I would execute an ioctl to make your
> > driver do the work. The driver is already installed with its
> > interrupt attached. The ioctl would return the results....
>
> 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?

But interrupt 15 is not IRQ 15! I forget what Linux does, but on a PC/AT,
IRQ0 starts at interrupt 8. The INT instruction is a privileged
instruction, it causes a trap to the kernel. That's how users get kernel
services, they execute INT 0x80. The kernel trap-handler, instead of
blowing away the task, performs functions on behalf of the task.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.115 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
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