We handle many exceptions at EVT5 (hardware error level) so that we cancatch exceptions in our exception handling code. Today - if the globalinterrupt enable bit (IPEND[4]) is set (interrupts disabled) our traphandling code goes into a infinite loop, since we need interrupts to beon to defer things to EVT5.

Normal kernel code should not trigger this for any reason as IPEND[4] getscleared early (when doing an interrupt context save) and the kernel stackthere should be sane (or something much worse is happening in the system).But there have been a few times where this has happened, so this changemakes sure we dump a proper crash message even when things have gone south.

-#ifndef CONFIG_KGDB- /* IPEND is skipped if KGDB isn't enabled (see entry code) */- fp->ipend = bfin_read_IPEND();-#endif- /* trap_c() will be called for exceptions. During exceptions * processing, the pc value should be set with retx value. * With this change we can cleanup some code in signal.c- TODO@@ -1116,10 +1111,16 @@ void show_regs(struct pt_regs *fp)

- /* Disable all interrupts, but make sure level 5 is enabled so- * we can switch to that level. Save the old mask. */+ /* Save the current IMASK, since we change in order to jump to level 5 */ cli r6; [p5 + PDA_EXIMASK] = r6;