Re: Why ack interrupt before calling handler?

2 messages, 2 authors, 2003-06-11 · open the first message on its own page

Re: Why ack interrupt before calling handler?

From: Kent Borg <hidden>
Date: 2003-06-11 12:39:53

On Wed, Jun 11, 2003 at 12:33:42PM +0200, Kenneth Johansson wrote:
I don't know what code you are looking at but generally you want to
first ack to avoid the race condition that would otherwise be present if
you first run your interrupt routine then ack. How would you know that
it was in fact not a new interrupt condition that you have not taken
care of you just removed.
In my case I have a level-triggered interrupt that is latched by the
hardware.

So the first ack tells the interrupt controller to forget about it,
but as the interrupting hardware has not yet been serviced, the
level-triggered interrupt is still being asserted, so that ack becomes
a nop.

Now the specific handler gets called, it deals with the specifics of
the situation, removing the cause of the interrupt, and returns.

Finally the interrupt end gets called, which acks and enables the
interrupt.  This ack actually does something for me.

I am thinking that the general purpose PPC code does the early
ack for edge-triggered circumstances.  For latched level-triggered
cases there is no harm in the extra early ack.


Thanks,

-kb, the Kent whose nose has been closely in that code because he has
been chasing a spurious interrupt problem.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Why ack interrupt before calling handler?

From: Kenneth Johansson <hidden>
Date: 2003-06-11 12:58:32

On Wed, 2003-06-11 at 14:39, Kent Borg wrote:
On Wed, Jun 11, 2003 at 12:33:42PM +0200, Kenneth Johansson wrote:
Finally the interrupt end gets called, which acks and enables the
interrupt.  This ack actually does something for me.
Hopefully this ack only happens if the interrupt is level triggered
otherwise you have a problem.
I am thinking that the general purpose PPC code does the early
ack for edge-triggered circumstances.  For latched level-triggered
cases there is no harm in the extra early ack.
Thats right.

--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 719 70 20
Tellusborgsvägen  90              Fax: +46 8 719 29 45
126 25 Stockholm                  ken@switchboard.ericsson.se


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help