bsp/leon3: Move SMP data to start.S

The LEON3_Boot_Cpu global object is only used by start.S.  Move the definition
of this object to start.S and use a local symbol .Lbootcpuindex for it.

Use a compare-and-swap instruction to assign the boot CPU.  This allows a
concurrent initialization.

Close #4845.
This commit is contained in:
Sebastian Huber
2023-02-10 10:52:02 +01:00
parent 519e288a96
commit b993111594
2 changed files with 24 additions and 16 deletions

View File

@@ -59,11 +59,6 @@ int CPU_SPARC_HAS_SNOOPING;
/* Index of CPU, in an AMP system CPU-index may be non-zero */
uint32_t LEON3_Cpu_Index = 0;
#if defined(RTEMS_SMP)
/* Index of the boot CPU. Set by the first CPU at boot to its CPU ID. */
int LEON3_Boot_Cpu = -1;
#endif
/*
* set_snooping
*