Is there any Guru who knows why interrupts are disabled in IS R?

Phil Torre ptorre at zetron.com
Tue Mar 12 02:21:10 UTC 2002


On Thu, Mar 07, 2002 at 10:57:14PM +0200, Leon Pollak wrote:
> Hello Gurus,
>         I shall be very thankful for the explanation of the following
moment:
>         I look into PPC code file irq_stub.S routine __ISR_handler I see
that 
> all 
> interrupts are disabled almost immediatly. They are reenabled at the end
of 
> the ISR, after the user ISR has finished its processing, almost at the
point 
> of exit from __ISR_handler.
>         This text contains the comment after the _ISR_NestLevel
incrementing:
> "From here on out, interrupts can be re-enabled, RTEMS convention says
not".
>         Can somebody explain me why interrupts must be disabled inside the

> user ISR?

All of the right code is already in place to do the nesting, but no one ever
turns the interrupt enable bit back on.  I tried enabling interrupts right
below that comment, but found that some interrupts (like the PIT) will
fire again immediately if their event bit hasn't been turned of by the ISR.
So, we now use a macro that sets MSR[EE] in each ISR; everyone has been told
to insert that macro in their ISRs after it's safe to re-enable interrupts.

-Phil

-- 

=====================================================================
Phil Torre                               phone: 425-820-6363 x234
Design Engineer                          email: ptorre at zetron.com
Switching Systems Group                    fax: 425-820-7031
Zetron, Inc.                               web: http://www.zetron.com


  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20020311/293efdd0/attachment.html>


More information about the users mailing list