[PATCH 2/4] bsp/leon3: Use interrupt entry for the SMP support

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Dec 10 13:38:32 UTC 2021


Using rtems_interrupt_entry_install() instead of
rtems_interrupt_handler_install() avoids a dependency on the dynamic memory
allocation.
---
 bsps/sparc/leon3/start/bspsmp.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/bsps/sparc/leon3/start/bspsmp.c b/bsps/sparc/leon3/start/bspsmp.c
index a556da1e09..74f9df5404 100644
--- a/bsps/sparc/leon3/start/bspsmp.c
+++ b/bsps/sparc/leon3/start/bspsmp.c
@@ -51,6 +51,13 @@ void bsp_start_on_secondary_processor(Per_CPU_Control *cpu_self)
   _SMP_Start_multitasking_on_secondary_processor(cpu_self);
 }
 
+static rtems_interrupt_entry leon3_inter_processor_interrupt_entry =
+  RTEMS_INTERRUPT_ENTRY_INITIALIZER(
+    bsp_inter_processor_interrupt,
+    NULL,
+    "IPI"
+  );
+
 static void leon3_install_inter_processor_interrupt( void )
 {
   rtems_status_code sc;
@@ -60,12 +67,10 @@ static void leon3_install_inter_processor_interrupt( void )
 
   bsp_interrupt_set_affinity( irq, _SMP_Get_online_processors() );
 
-  sc = rtems_interrupt_handler_install(
+  sc = rtems_interrupt_entry_install(
     irq,
-    "IPI",
     RTEMS_INTERRUPT_SHARED,
-    bsp_inter_processor_interrupt,
-    NULL
+    &leon3_inter_processor_interrupt_entry
   );
   _Assert_Unused_variable_equals( sc, RTEMS_SUCCESSFUL );
 }
-- 
2.26.2



More information about the devel mailing list