powerpc mvme5500 clock off by factor of 150

Peter Dufault dufault at hda.com
Tue Mar 8 12:07:35 UTC 2005

Can someone explain the code in many powerpc irq.c's for 

We see:

if (excNum == ASM_DEC_VECTOR) {
   new_msr = msr | MSR_EE;


It looks to me as if we save the exception enable state, enable 
exceptions, call the handler, and then restore the exception state.

What's the logic here?  If exceptions are disabled, we enable them, the 
exception fires, we re-enter, call the handler once with exceptions 
enabled, return, call the handler a second time with exceptions still 
enabled, then disable exceptions?  If exceptions are already enabled we 
call it once, and saving/restoring exception state is probably a NOP.

I don't follow the logic, it at least needs a comment.


Peter Dufault
HD Associates, Inc.

More information about the users mailing list