score: Rename bsp_smp_initialize()

Rename bsp_smp_initialize() into _CPU_SMP_Initialize() since every CPU
port must supply this function.
This commit is contained in:
Sebastian Huber
2014-02-17 14:25:29 +01:00
parent 2afe065785
commit 4627fcdab1
13 changed files with 33 additions and 26 deletions

View File

@@ -25,7 +25,7 @@ static void ipi_handler(void *arg)
rtems_smp_process_interrupt();
}
uint32_t bsp_smp_initialize(uint32_t configured_cpu_count)
uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
{
rtems_status_code sc;
uint32_t max_cpu_count = arm_gic_irq_processor_count();

View File

@@ -787,7 +787,7 @@ static void secondary_cpu_initialize(void)
}
#include <rtems/bspsmp.h>
uint32_t bsp_smp_initialize( uint32_t configured_cpu_count )
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
{
int cores;
/* XXX need to deal with finding too many cores */

View File

@@ -141,7 +141,7 @@ static void ipi_handler(void *arg)
rtems_smp_process_interrupt();
}
uint32_t bsp_smp_initialize(uint32_t configured_cpu_count)
uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
{
rtems_status_code sc;
uint32_t cores = configured_cpu_count < CORE_COUNT ?

View File

@@ -15,7 +15,7 @@
#include <rtems/bspsmp.h>
#include <stdlib.h>
uint32_t bsp_smp_initialize( uint32_t configured_cpu_count )
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
{
/* return the number of CPUs */
return 1;

View File

@@ -47,7 +47,7 @@ void leon3_secondary_cpu_initialize(uint32_t cpu)
rtems_smp_secondary_cpu_initialize();
}
uint32_t bsp_smp_initialize( uint32_t configured_cpu_count )
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
{
uint32_t max_cpu_count;
uint32_t used_cpu_count;

View File

@@ -467,6 +467,8 @@ void _CPU_Context_volatile_clobber( uintptr_t pattern );
void _CPU_Context_validate( uintptr_t pattern );
#ifdef RTEMS_SMP
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
_CPU_SMP_Get_current_processor( void )
{

View File

@@ -462,6 +462,8 @@ uint32_t _CPU_ISR_Get_level( void );
_CPU_Context_restore( (_the_context) );
#if defined(RTEMS_SMP)
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );

View File

@@ -1461,6 +1461,24 @@ CPU_Counter_ticks _CPU_Counter_difference(
);
#ifdef RTEMS_SMP
/**
* @brief Performs CPU specific SMP initialization in the context of the main
* processor.
*
* This function is invoked on the main processor by RTEMS during
* initialization. All interrupt stacks are allocated at this point in case
* the CPU port allocates the interrupt stacks.
*
* The CPU port should start secondary processors now.
*
* @param[in] configured_cpu_count The count of processors requested by the
* application configuration.
*
* @return The count of processors available for the application in the system.
* This value is less than or equal to the configured count of processors.
*/
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
/**
* @brief Returns the index of the current processor.
*

View File

@@ -1034,6 +1034,8 @@ void _CPU_Context_volatile_clobber( uintptr_t pattern );
void _CPU_Context_validate( uintptr_t pattern );
#ifdef RTEMS_SMP
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
_CPU_SMP_Get_current_processor( void )
{

View File

@@ -1161,6 +1161,8 @@ void _CPU_Context_restore(
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
#if defined(RTEMS_SMP)
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count );
RTEMS_COMPILER_PURE_ATTRIBUTE uint32_t _CPU_SMP_Get_current_processor( void );
void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );

View File

@@ -51,24 +51,6 @@ extern "C" {
#ifndef ASM
/**
* @brief Performs BSP specific SMP initialization in the context of the main
* processor.
*
* This function is invoked on the main processor by RTEMS during
* initialization. All interrupt stacks are allocated at this point in case
* the CPU port allocates the interrupt stacks.
*
* The BSP may start secondary processors now.
*
* @param[in] configured_cpu_count The count of processors requested by the
* application configuration.
*
* @return The count of processors available for the application in the system.
* This value is less than or equal to the configured count of processors.
*/
uint32_t bsp_smp_initialize( uint32_t configured_cpu_count );
/**
* @brief Generate an interprocessor broadcast interrupt.
*

View File

@@ -29,7 +29,6 @@
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#include <rtems/bspsmp.h>
void _SMP_Handler_initialize(void)
{
@@ -39,7 +38,7 @@
/*
* Discover and initialize the secondary cores in an SMP system.
*/
max_cpus = bsp_smp_initialize( max_cpus );
max_cpus = _CPU_SMP_Initialize( max_cpus );
_SMP_Processor_count = max_cpus;

View File

@@ -138,7 +138,7 @@ void _SMP_Request_other_cores_to_shutdown( void )
/*
* Do not use _SMP_Get_processor_count() since this value might be not
* initialized yet. For example due to a fatal error in the middle of
* bsp_smp_initialize().
* _CPU_SMP_Initialize().
*/
uint32_t ncpus = rtems_configuration_get_maximum_processors();