[PATCH 3/6] score/cpu/or1k: Follow no_cpu ISR_Handler algorithm.
Hesham ALMatary
heshamelmatary at gmail.com
Mon Sep 15 22:33:30 UTC 2014
This patch adjusts ISR_Handler to exactly follow the pseudo code introduced
in
http://rtems.org/onlinedocs/doc-current/share/rtems/html/porting/Interrupts-Interrupt-Dispatching.html
It adds two new checkings on _Thread_Dispatch_disable_level and _ISR_Nest_level
after returning from the C handler.
---
cpukit/score/cpu/or1k/or1k-exception-handler-low.S | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/cpukit/score/cpu/or1k/or1k-exception-handler-low.S b/cpukit/score/cpu/or1k/or1k-exception-handler-low.S
index b18c4a3..eb279d0 100644
--- a/cpukit/score/cpu/or1k/or1k-exception-handler-low.S
+++ b/cpukit/score/cpu/or1k/or1k-exception-handler-low.S
@@ -149,6 +149,16 @@ jump_to_c_handler:
l.sw 0(r6), r5
l.sw 0(r8), r7
+ /* Check if _ISR_Nest_level > 0 */
+ l.sfgtui r5, 0
+ l.bf exception_frame_restore
+ l.nop
+
+ /* Check if _Thread_Dispatch_disable_level > 0 */
+ l.sfgtui r7, 0
+ l.bf exception_frame_restore
+ l.nop
+
/* Check if dispatch needed */
l.movhi r31, hi(DISPATCH_NEEDED)
l.ori r31, r31, lo(DISPATCH_NEEDED)
--
1.9.3
More information about the devel
mailing list