[PATCH] m68k: Fix interrupt stack switch

sebastian.huber at embedded-brains.de sebastian.huber at embedded-brains.de
Fri Jun 1 14:09:21 UTC 2012


From: Sebastian Huber <sebastian.huber at embedded-brains.de>

The previous code compared
  &_Per_CPU_Information [0].interrupt_stack_low
with the current stack pointer (register a7).  Instead it must compare
the value
  _Per_CPU_Information [0].interrupt_stack_low
with the current stack pointer.
---
 cpukit/score/cpu/m68k/cpu_asm.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/cpu/m68k/cpu_asm.S b/cpukit/score/cpu/m68k/cpu_asm.S
index f68cb10..f8852e4 100644
--- a/cpukit/score/cpu/m68k/cpu_asm.S
+++ b/cpukit/score/cpu/m68k/cpu_asm.S
@@ -260,9 +260,9 @@ SYM (_ISR_Handler):
 
 
 #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
-        | Make a0 point just above interrupt stack
+        movel   INTERRUPT_STACK_LOW,a1
         movel   INTERRUPT_STACK_HIGH,a0
-        cmpl    INTERRUPT_STACK_LOW,a7  | stack below interrupt stack?
+        cmpl    a1,a7                   | stack below interrupt stack?
         bcs.b   1f                      | yes, switch to interrupt stack
         cmpl    a0,a7                   | stack above interrupt stack?
         bcs.b   2f                      | no, do not switch stacks
-- 
1.7.1




More information about the devel mailing list