[rtems commit] bsp/leon3: Use interrupt entry for the SMP support

Sebastian Huber sebh at rtems.org
Mon Dec 13 07:21:24 UTC 2021


Module:    rtems
Branch:    master
Commit:    1179430fb4b76d6b75fd0a9735ff17b6e32dc521
Changeset: http://git.rtems.org/rtems/commit/?id=1179430fb4b76d6b75fd0a9735ff17b6e32dc521

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Dec 10 14:24:49 2021 +0100

bsp/leon3: Use interrupt entry for the SMP support

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 a556da1..74f9df5 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 );
 }



More information about the vc mailing list