summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-13 15:41:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-17 13:09:50 +0200
commitca63ae2ec0b7831d533497078c0982ba758eec81 (patch)
tree3ee772f6fe21474a07e1ddf7ac9b09b66d1a6b69 /cpukit/score
parentsmp: Add and use _CPU_SMP_Get_current_processor() (diff)
downloadrtems-ca63ae2ec0b7831d533497078c0982ba758eec81.tar.bz2
smp: Add and use _CPU_SMP_Send_interrupt()
Delete bsp_smp_interrupt_cpu().
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/cpu/arm/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/i386/rtems/score/cpu.h2
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu.h10
-rw-r--r--cpukit/score/cpu/powerpc/rtems/score/cpu.h1
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpu.h2
-rw-r--r--cpukit/score/include/rtems/bspsmp.h12
-rw-r--r--cpukit/score/src/smp.c2
7 files changed, 18 insertions, 13 deletions
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index ed1b605d09..519d486b12 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -457,6 +457,8 @@ void _CPU_Context_validate( uintptr_t pattern );
return mpidr & 0xffU;
}
+ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
+
static inline void _ARM_Data_memory_barrier( void )
{
__asm__ volatile ( "dmb" : : : "memory" );
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index b00ae3bfd8..092ba995d3 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -457,6 +457,8 @@ uint32_t _CPU_ISR_Get_level( void );
RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
+ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
+
static inline void _CPU_Processor_event_broadcast( void )
{
__asm__ volatile ( "" : : : "memory" );
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index d368e51c5f..dc48d2bbc8 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -1417,6 +1417,16 @@ static inline uint32_t CPU_swap_u32(
}
/**
+ * @brief Sends an inter-processor interrupt to the specified target
+ * processor.
+ *
+ * This operation is undefined for target processor indices out of range.
+ *
+ * @param[in] target_processor_index The target processor index.
+ */
+ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
+
+ /**
* @brief Broadcasts a processor event.
*
* Some architectures provide a low-level synchronization primitive for
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
index 8362c64b3f..17f2d39ce0 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
@@ -1014,6 +1014,7 @@ void _CPU_Context_validate( uintptr_t pattern );
return pir;
}
+ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
static inline void _CPU_Processor_event_broadcast( void )
{
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index e4eb65e88a..8ba7a41044 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -1188,6 +1188,8 @@ void _CPU_Context_restore(
RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
+ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
+
static inline void _CPU_Processor_event_broadcast( void )
{
__asm__ volatile ( "" : : : "memory" );
diff --git a/cpukit/score/include/rtems/bspsmp.h b/cpukit/score/include/rtems/bspsmp.h
index 57f5a7a458..ec8be9f085 100644
--- a/cpukit/score/include/rtems/bspsmp.h
+++ b/cpukit/score/include/rtems/bspsmp.h
@@ -84,18 +84,6 @@ uint32_t bsp_smp_initialize( uint32_t configured_cpu_count );
void bsp_smp_broadcast_interrupt(void);
/**
- * @brief Generate a interprocessor interrupt.
- *
- * This method is invoked by RTEMS to let @a cpu know that it
- * has sent it a message.
- *
- * @param [in] cpu is the recipient CPU
- */
-void bsp_smp_interrupt_cpu(
- int cpu
-);
-
-/**
* @brief Performs high-level initialization of a secondary processor and runs
* the application threads.
*
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index 8e06d04068..4d2a1b52f8 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -121,7 +121,7 @@ void _SMP_Send_message( uint32_t cpu, uint32_t message )
per_cpu->message |= message;
_Per_CPU_Lock_release( per_cpu, level );
- bsp_smp_interrupt_cpu( cpu );
+ _CPU_SMP_Send_interrupt( cpu );
}
void _SMP_Broadcast_message( uint32_t message )