[PATCH 17/17] score: Rename rtems_smp_process_interrupt()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Feb 17 15:51:42 UTC 2014


Rename rtems_smp_process_interrupt() into
_SMP_Inter_processor_interrupt_handler().  Delete unused header file
<rtems/bspsmp.h>.
---
 c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c     |    8 +-
 .../libbsp/arm/shared/include/arm-a9mpcore-start.h |    1 -
 c/src/lib/libbsp/i386/shared/smp/smp-imps.c        |    8 +--
 c/src/lib/libbsp/powerpc/qoriq/startup/smp.c       |    7 +-
 c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c       |    7 +-
 cpukit/score/Makefile.am                           |    1 -
 cpukit/score/include/rtems/bspsmp.h                |   73 --------------------
 cpukit/score/include/rtems/score/smpimpl.h         |    5 ++
 cpukit/score/preinstall.am                         |    4 -
 cpukit/score/src/smp.c                             |    3 +-
 10 files changed, 19 insertions(+), 98 deletions(-)
 delete mode 100644 cpukit/score/include/rtems/bspsmp.h

diff --git a/c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c b/c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c
index bf776c5..9baf193 100644
--- a/c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c
+++ b/c/src/lib/libbsp/arm/shared/arm-a9mpcore-smp.c
@@ -14,15 +14,15 @@
 
 #include <assert.h>
 
-#include <rtems/bspsmp.h>
+#include <rtems/score/smpimpl.h>
 
 #include <libcpu/arm-cp15.h>
 
 #include <bsp/irq.h>
 
-static void ipi_handler(void *arg)
+static void bsp_inter_processor_interrupt(void *arg)
 {
-  rtems_smp_process_interrupt();
+  _SMP_Inter_processor_interrupt_handler();
 }
 
 uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
@@ -36,7 +36,7 @@ uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
     ARM_GIC_IRQ_SGI_0,
     "IPI",
     RTEMS_INTERRUPT_UNIQUE,
-    ipi_handler,
+    bsp_inter_processor_interrupt,
     NULL
   );
   assert(sc == RTEMS_SUCCESSFUL);
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-start.h b/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-start.h
index e11bc71..dd1b7c1 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-start.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-start.h
@@ -23,7 +23,6 @@
 #ifndef LIBBSP_ARM_SHARED_ARM_A9MPCORE_START_H
 #define LIBBSP_ARM_SHARED_ARM_A9MPCORE_START_H
 
-#include <rtems/bspsmp.h>
 #include <rtems/score/smpimpl.h>
 
 #include <libcpu/arm-cp15.h>
diff --git a/c/src/lib/libbsp/i386/shared/smp/smp-imps.c b/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
index 1ed5d41..1e5faeb 100644
--- a/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
+++ b/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
@@ -78,7 +78,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <rtems.h>
-#include <rtems/bspsmp.h>
 #include <rtems/bspIo.h>
 #include <libcpu/cpu.h>
 #include <assert.h>
@@ -743,13 +742,13 @@ static void smp_apic_ack(void)
   IMPS_LAPIC_WRITE(LAPIC_EOI, 0 );     /* ACK the interrupt */
 }
 
-static void ap_ipi_isr(void *arg)
+static void bsp_inter_processor_interrupt(void *arg)
 {
   (void) arg;
 
   smp_apic_ack();
 
-  rtems_smp_process_interrupt();
+  _SMP_Inter_processor_interrupt_handler();
 }
 
 static void ipi_install_irq(void)
@@ -760,7 +759,7 @@ static void ipi_install_irq(void)
     16,
     "smp-imps",
     RTEMS_INTERRUPT_UNIQUE,
-    ap_ipi_isr,
+    bsp_inter_processor_interrupt,
     NULL
   );
   assert(status == RTEMS_SUCCESSFUL);
@@ -787,7 +786,6 @@ static void secondary_cpu_initialize(void)
   _SMP_Start_multitasking_on_secondary_processor();
 }
 
-#include <rtems/bspsmp.h>
 uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
 {
   int cores;
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/smp.c b/c/src/lib/libbsp/powerpc/qoriq/startup/smp.c
index 4260c2b..89823d5 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/smp.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/smp.c
@@ -14,7 +14,6 @@
 
 #include <assert.h>
 
-#include <rtems/bspsmp.h>
 #include <rtems/score/smpimpl.h>
 
 #include <libcpu/powerpc-utility.h>
@@ -137,9 +136,9 @@ void qoriq_secondary_cpu_initialize(void)
   _SMP_Start_multitasking_on_secondary_processor();
 }
 
-static void ipi_handler(void *arg)
+static void bsp_inter_processor_interrupt(void *arg)
 {
-  rtems_smp_process_interrupt();
+  _SMP_Inter_processor_interrupt_handler();
 }
 
 uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
@@ -152,7 +151,7 @@ uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
     QORIQ_IRQ_IPI_0,
     "IPI",
     RTEMS_INTERRUPT_UNIQUE,
-    ipi_handler,
+    bsp_inter_processor_interrupt,
     NULL
   );
   assert(sc == RTEMS_SUCCESSFUL);
diff --git a/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c b/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c
index aac0396..59861b3 100644
--- a/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c
+++ b/c/src/lib/libbsp/sparc/leon3/smp/smp_leon3.c
@@ -16,7 +16,6 @@
 #include <bsp.h>
 #include <leon.h>
 #include <rtems/bspIo.h>
-#include <rtems/bspsmp.h>
 #include <rtems/score/smpimpl.h>
 #include <stdlib.h>
 
@@ -32,11 +31,11 @@ static inline unsigned int sparc_leon3_get_cctrl( void )
   return v;
 }
 
-static rtems_isr bsp_ap_ipi_isr(
+static rtems_isr bsp_inter_processor_interrupt(
   rtems_vector_number vector
 )
 {
-  rtems_smp_process_interrupt();
+  _SMP_Inter_processor_interrupt_handler();
 }
 
 void leon3_secondary_cpu_initialize(uint32_t cpu)
@@ -75,7 +74,7 @@ uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
 
   if ( used_cpu_count > 1 ) {
     LEON_Unmask_interrupt(LEON3_MP_IRQ);
-    set_vector(bsp_ap_ipi_isr, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1);
+    set_vector(bsp_inter_processor_interrupt, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1);
   }
 
   for ( cpu = 1 ; cpu < used_cpu_count ; ++cpu ) {
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index b247af6..6663d5c 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -10,7 +10,6 @@ include_rtemsdir = $(includedir)/rtems
 include_rtems_HEADERS = include/rtems/debug.h
 include_rtems_HEADERS += include/rtems/system.h
 include_rtems_HEADERS += include/rtems/seterr.h
-include_rtems_HEADERS += include/rtems/bspsmp.h
 
 include_rtems_scoredir = $(includedir)/rtems/score
 
diff --git a/cpukit/score/include/rtems/bspsmp.h b/cpukit/score/include/rtems/bspsmp.h
deleted file mode 100644
index 37c0380..0000000
--- a/cpukit/score/include/rtems/bspsmp.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- *  @file  rtems/bspsmp.h
- *
- *  @brief Interface Between RTEMS and an SMP Aware BSP
- *
- *  This include file defines the interface between RTEMS and an
- *  SMP aware BSP.  These methods will only be used when RTEMS
- *  is configured with SMP support enabled.
- */
-
-/*
- *  COPYRIGHT (c) 1989-2011.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.com/license/LICENSE.
- */
-
-#ifndef _RTEMS_BSPSMP_H
-#define _RTEMS_BSPSMP_H
-
-#include <rtems/score/cpuopts.h>
-
-#if defined (RTEMS_SMP)
-#include <rtems/score/percpu.h>
-
-/**
- *  @defgroup RTEMS BSP SMP Interface
- *
- *  @ingroup Score
- *
- *  This defines the interface between RTEMS and the BSP for
- *  SMP support.  The interface uses the term primary
- *  to refer to the "boot" processor and secondary to refer
- *  to the "application" processors.  Different architectures
- *  use different terminology.
- *
- *  It is assumed that when the processor is reset and thus
- *  when RTEMS is initialized, that the primary processor is
- *  the only one executing.  The others are assumed to be in
- *  a quiescent or reset state awaiting a command to come online.
- */
-
-/**@{*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifndef ASM
-
-/**
- *  @brief Process the incoming interprocessor request.
- *
- *  This is the method called by the BSP's interrupt handler
- *  to process the incoming interprocessor request.
- */
-void rtems_smp_process_interrupt(void);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/**@}*/
-#endif
-
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h
index dc51cdf..cbb3466 100644
--- a/cpukit/score/include/rtems/score/smpimpl.h
+++ b/cpukit/score/include/rtems/score/smpimpl.h
@@ -90,6 +90,11 @@ void _SMP_Start_multitasking_on_secondary_processor( void )
   RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
 
 /**
+ * @brief Interrupt handler for inter-processor interrupts.
+ */
+void _SMP_Inter_processor_interrupt_handler( void );
+
+/**
  *  @brief Sends a SMP message to a processor.
  *
  *  The target processor may be the sending processor.
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index c9d0ab9..4d36ebe 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -30,10 +30,6 @@ $(PROJECT_INCLUDE)/rtems/seterr.h: include/rtems/seterr.h $(PROJECT_INCLUDE)/rte
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/seterr.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/seterr.h
 
-$(PROJECT_INCLUDE)/rtems/bspsmp.h: include/rtems/bspsmp.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/bspsmp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/bspsmp.h
-
 $(PROJECT_INCLUDE)/rtems/score/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/score
 	@: > $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index 86e9cd2..86116da 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -18,7 +18,6 @@
 #include "config.h"
 #endif
 
-#include <rtems/bspsmp.h>
 #include <rtems/score/smpimpl.h>
 #include <rtems/score/assert.h>
 #include <rtems/score/threaddispatch.h>
@@ -45,7 +44,7 @@ void _SMP_Start_multitasking_on_secondary_processor( void )
   _Thread_Start_multitasking();
 }
 
-void rtems_smp_process_interrupt( void )
+void _SMP_Inter_processor_interrupt_handler( void )
 {
   Per_CPU_Control *self_cpu = _Per_CPU_Get();
 
-- 
1.7.7




More information about the devel mailing list