SMP: Add per-CPU initialization logic
This commit is contained in:
parent
79c1fa5bd7
commit
2225940155
2
arch
2
arch
@ -1 +1 @@
|
|||||||
Subproject commit 9336bbac1c82d417d65d0a973359e4fad25e2dd1
|
Subproject commit e1ae334ff043872b3678fc7fd48bea6125e8ea44
|
@ -1753,6 +1753,28 @@ int up_cpu_index(void);
|
|||||||
int up_cpu_start(int cpu);
|
int up_cpu_start(int cpu);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: up_cpu_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* After the CPU has been started (via up_cpu_start()) the system will
|
||||||
|
* call back into the architecture-specific code with this function on the
|
||||||
|
* thread of execution of the newly started CPU. This gives the
|
||||||
|
* architecture-specific a chance to perform ny initial, CPU-specific
|
||||||
|
* initialize on that thread.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero on success; a negated errno value on failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
int up_cpu_initialize(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_cpu_pause
|
* Name: up_cpu_pause
|
||||||
*
|
*
|
||||||
|
@ -80,11 +80,14 @@ static const char g_idlename[] = "CPUn Idle"
|
|||||||
* Name: os_idle_trampoline
|
* Name: os_idle_trampoline
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
|
* This is the common start-up logic for the IDLE task for CPUs 1 through
|
||||||
* It is equivalent to the CPU 0 IDLE logic in os_start.c
|
* (CONFIG_SMP_NCPUS-1). Having a start-up function such as this for the
|
||||||
|
* IDLE is not really an architectural necessity. It is used only for
|
||||||
|
* symmetry with now other threads are started (see task_start() and
|
||||||
|
* pthread_start()).
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* Standard task arguments.
|
* None.
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This function does not return.
|
* This function does not return.
|
||||||
@ -93,7 +96,11 @@ static const char g_idlename[] = "CPUn Idle"
|
|||||||
|
|
||||||
void os_idle_trampoline(void)
|
void os_idle_trampoline(void)
|
||||||
{
|
{
|
||||||
/* Transfer control to the IDLE task */
|
/* Perform architecture-specific initialization for this CPU */
|
||||||
|
|
||||||
|
up_cpu_initialize();
|
||||||
|
|
||||||
|
/* Then transfer control to the IDLE task */
|
||||||
|
|
||||||
(void)os_idle_task(0, NULL);
|
(void)os_idle_task(0, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user