forked from Imagelibrary/rtems
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:
@@ -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();
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 ?
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user