Re: APIC and edge triggered vs level triggered

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Tue Jul 18 2000 - 06:59:16 EST


 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

>Cool. :-) But what is (the difference between) edge triggered and level
>triggered? I searched on the Internet, but couldn't find it.. Please
>enlighten me :-)

Edge triggered: The interrupt line voltage goes like this:
____-__________
I.e. normally low, and a pulse to signal the interrupt.

This makes interrupt sharing hard, as two devices could do this
simultaneously resulting in only one interrupt, leaving you to wonder
if one or several devices need attention. ISA devices works like this.
Two simultaneous interrupts may seem unlikely, but keep in mind that
this problem also occur if the second interrupt happens while the
first is being serviced. Some interrupt handlers takes a long time,
and some devices makes lots of interrupts. Having one of either
kind sharing is a recipe for disaster.

Level triggered: The interrupt voltage goes like this: ______-------
I.e. normally low, but it goes high and remains high until the device
driver/kernel
turns it off. This makes interrupt sharing easier. Two or more devices
sharing an interrupt can both pull the voltage up. One of them will
have its
device driver called. The driver will do whatever the device needs, and
turn off
its interrupt signal. But the signal will remain high because of the
other
device that isn't serviced yet. So a new interrupt happens as soon as
the first
completes. Now, the first driver see that its device isn't active, so
control
is passed to the next device sharing the interrupt. This one services
its device,
and turn off its interrupt signal. The interrupt line goes low again
when
all active sharing devices have been serviced, and normal operation
continues.
PCI devices normally use level-triggered interrupts. Some bioses allow
edge-triggered
operation for backward compatibility (i.e. a PCI card supposed to work
with
existing drivers for ISA cards.)

Helge Hafting

-
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/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:10 EST