summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/m68k/cpu_asm.S
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-14 23:08:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-14 23:08:04 +0000
commit8e0738e1e643041794c633e76135235d83d9bf9a (patch)
treeba45f962bdd13a330beebcbb3592e1d8ac1c1560 /cpukit/score/cpu/m68k/cpu_asm.S
parent2002-08-14 Greg Menke <gregory.menke@gsfc.nasa.gov> (diff)
downloadrtems-8e0738e1e643041794c633e76135235d83d9bf9a.tar.bz2
2002-08-14 Brett Swimley <brett.swimley@aedinc.net>
* cpu_asm.S: Per PR267, the _ISR_Handler() function never was modifying _ISR_Nest_level, and _Watchdog_Insert() requires this variable to be modified to determine if an interrupt may have modified the watchdog chain. Prior to modifying _ISR_Handler(), I had a test that would fail if _ISR_Flash was not commented out in _Watchdog_Insert(). After this modification was made, my test ran flawlessly.
Diffstat (limited to 'cpukit/score/cpu/m68k/cpu_asm.S')
-rw-r--r--cpukit/score/cpu/m68k/cpu_asm.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/score/cpu/m68k/cpu_asm.S b/cpukit/score/cpu/m68k/cpu_asm.S
index 0d14c16401..c8357a09c5 100644
--- a/cpukit/score/cpu/m68k/cpu_asm.S
+++ b/cpukit/score/cpu/m68k/cpu_asm.S
@@ -139,6 +139,8 @@ SYM (_ISR_Handler):
#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
+ tstl SYM (_ISR_Nest_level) | Interrupting an interrupt handler?
+ bne 2f | Yes, just skip over stack switch code
movel _CPU_Interrupt_stack_high,a0 | a0 now point just above interrupt stack
cmpl _CPU_Interrupt_stack_low,a7 | stack below interrupt stack?
bcs.b 1f | yes, switch to interrupt stack
@@ -151,6 +153,8 @@ SYM (_ISR_Handler):
2:
#endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
+ addql #1,SYM(_ISR_Nest_level) | one nest level deeper
+
movel SYM (_ISR_Vector_table),a0 | a0= base of RTEMS table
#if ( M68K_HAS_PREINDEXING == 1 )
movel (a0,d0:w:1),a0 | a0 = address of user routine
@@ -165,14 +169,17 @@ SYM (_ISR_Handler):
addql #4,a7 | remove vector number
#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
+ subql #1,SYM(_ISR_Nest_level) | Reduce interrupt-nesting count
+ bne 1f | Skip if return to interrupt
movel _CPU_Interrupt_stack_high,a0
subql #4,a0
cmpl a0,a7 | At top of interrupt stack?
bne.b 1f | No, do not restore task stack pointer
movel (a7),a7 | Restore task stack pointer
1:
+#else
+ subql #1,SYM (_ISR_Nest_level) | one less nest level
#endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
-
subql #1,SYM (_Thread_Dispatch_disable_level)
| unnest multitasking
bne.b exit | If dispatch disabled, exit