[PATCH 2/5] bsps/sparc: Avoid internal var in tm27 support

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 24 12:52:21 UTC 2017


Update #3254.
---
 c/src/lib/libbsp/sparc/erc32/include/tm27.h | 10 ++++++++--
 c/src/lib/libbsp/sparc/leon2/include/tm27.h | 10 ++++++++--
 c/src/lib/libbsp/sparc/leon3/include/tm27.h | 10 ++++++++--
 3 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/erc32/include/tm27.h b/c/src/lib/libbsp/sparc/erc32/include/tm27.h
index 77024cb667..11a57b1058 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/tm27.h
+++ b/c/src/lib/libbsp/sparc/erc32/include/tm27.h
@@ -37,7 +37,7 @@
 
 #define Cause_tm27_intr() \
   do { \
-    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1) ); \
+    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
     nop(); \
     nop(); \
     nop(); \
@@ -46,6 +46,12 @@
 #define Clear_tm27_intr() \
   ERC32_Clear_interrupt( TEST_INTERRUPT_SOURCE )
 
-#define Lower_tm27_intr() /* empty */
+#define Lower_tm27_intr() \
+  do { \
+    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE2 ); \
+    nop(); \
+    nop(); \
+    nop(); \
+  } while (0)
 
 #endif
diff --git a/c/src/lib/libbsp/sparc/leon2/include/tm27.h b/c/src/lib/libbsp/sparc/leon2/include/tm27.h
index 6d498c2353..d7c43800dd 100644
--- a/c/src/lib/libbsp/sparc/leon2/include/tm27.h
+++ b/c/src/lib/libbsp/sparc/leon2/include/tm27.h
@@ -36,7 +36,7 @@
 
 #define Cause_tm27_intr() \
   do { \
-    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1)); \
+    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
     nop(); \
     nop(); \
     nop(); \
@@ -45,6 +45,12 @@
 #define Clear_tm27_intr() \
   LEON_Clear_interrupt( TEST_INTERRUPT_SOURCE )
 
-#define Lower_tm27_intr() /* empty */
+#define Lower_tm27_intr() \
+  do { \
+    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE2 ); \
+    nop(); \
+    nop(); \
+    nop(); \
+  } while (0)
 
 #endif
diff --git a/c/src/lib/libbsp/sparc/leon3/include/tm27.h b/c/src/lib/libbsp/sparc/leon3/include/tm27.h
index db1973c2e8..518ceab0e9 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/tm27.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/tm27.h
@@ -36,7 +36,7 @@
 
 #define Cause_tm27_intr() \
   do { \
-    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1)); \
+    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
     nop(); \
     nop(); \
     nop(); \
@@ -45,6 +45,12 @@
 #define Clear_tm27_intr() \
   LEON_Clear_interrupt( TEST_INTERRUPT_SOURCE )
 
-#define Lower_tm27_intr() /* empty */
+#define Lower_tm27_intr() \
+  do { \
+    LEON_Force_interrupt( TEST_INTERRUPT_SOURCE2 ); \
+    nop(); \
+    nop(); \
+    nop(); \
+  } while (0)
 
 #endif
-- 
2.12.3




More information about the devel mailing list