summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-08 07:38:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-08 17:25:15 +0100
commit858135cf6449546e7f748da60011a34bfc3f6585 (patch)
tree91e2509186e25c94e97be658672f81e0e4591ba6
parentd3ad0e0535698fe4563259711ae70e01c19358dc (diff)
leon3 tm27.h
-rw-r--r--bsps/sparc/leon3/include/tm27.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/bsps/sparc/leon3/include/tm27.h b/bsps/sparc/leon3/include/tm27.h
index cfc97b125d..d4a321fcdf 100644
--- a/bsps/sparc/leon3/include/tm27.h
+++ b/bsps/sparc/leon3/include/tm27.h
@@ -21,6 +21,8 @@
#define __tm27_h
#include <bsp.h>
+#include <bsp/irq.h>
+#include <rtems/score/smpimpl.h>
/*
* Define the interrupt mechanism for Time Test 27
@@ -69,6 +71,17 @@ static inline void Install_tm27_vector(
static rtems_interrupt_entry entry_low;
static rtems_interrupt_entry entry_high;
+#if defined(RTEMS_SMP)
+ bsp_interrupt_set_affinity(
+ TEST_INTERRUPT_SOURCE,
+ _SMP_Get_online_processors()
+ );
+ bsp_interrupt_set_affinity(
+ TEST_INTERRUPT_SOURCE2,
+ _SMP_Get_online_processors()
+ );
+#endif
+
rtems_interrupt_entry_initialize(
&entry_low,
(rtems_interrupt_handler) handler,
@@ -93,6 +106,18 @@ static inline void Install_tm27_vector(
);
}
+#if defined(RTEMS_SMP)
+#define Cause_tm27_intr() \
+ do { \
+ rtems_interrupt_raise_on( \
+ TEST_INTERRUPT_SOURCE + (Interrupt_nest >> 1 ), \
+ rtems_scheduler_get_processor() \
+ ); \
+ nop(); \
+ nop(); \
+ nop(); \
+ } while (0)
+#else
#define Cause_tm27_intr() \
do { \
rtems_interrupt_raise( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1)); \
@@ -100,6 +125,7 @@ static inline void Install_tm27_vector(
nop(); \
nop(); \
} while (0)
+#endif
#define Clear_tm27_intr() \
rtems_interrupt_clear( TEST_INTERRUPT_SOURCE )