[rtems commit] score/cpu/or1k: Follow no_cpu ISR_Handler algorithm.
Joel Sherrill
joel at rtems.org
Tue Sep 16 14:45:21 UTC 2014
Module: rtems
Branch: master
Commit: e0aef221a2c910c8caa01a1d97e886042df1a9ac
Changeset: http://git.rtems.org/rtems/commit/?id=e0aef221a2c910c8caa01a1d97e886042df1a9ac
Author: Hesham ALMatary <heshamelmatary at gmail.com>
Date: Mon Sep 15 17:33:30 2014 -0500
score/cpu/or1k: Follow no_cpu ISR_Handler algorithm.
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 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cpukit/score/cpu/or1k/or1k-exception-handler-low.S b/cpukit/score/cpu/or1k/or1k-exception-handler-low.S
index 3a0425b..96d0c8e 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)
More information about the vc
mailing list