diff --git a/arch/x86_64/src/intel64/intel64_cpu.c b/arch/x86_64/src/intel64/intel64_cpu.c index 5e6e33f9df87c..30fcd95f3205a 100644 --- a/arch/x86_64/src/intel64/intel64_cpu.c +++ b/arch/x86_64/src/intel64/intel64_cpu.c @@ -49,8 +49,8 @@ * Public Data ****************************************************************************/ -extern volatile uint32_t g_cpu_count; -volatile static spinlock_t g_ap_boot; +extern volatile uint32_t g_cpu_count; +static spinlock_t g_ap_boot; /* CPU private data */ diff --git a/arch/x86_64/src/intel64/intel64_cpustart.c b/arch/x86_64/src/intel64/intel64_cpustart.c index 26715398b463c..ec78ccc720449 100644 --- a/arch/x86_64/src/intel64/intel64_cpustart.c +++ b/arch/x86_64/src/intel64/intel64_cpustart.c @@ -127,11 +127,9 @@ static int x86_64_ap_startup(int cpu) void x86_64_ap_boot(void) { - struct tcb_s *tcb = this_task(); + struct tcb_s *tcb; uint8_t cpu = 0; - UNUSED(tcb); - /* Do some checking on CPU compatibilities at the top of this function */ x86_64_check_and_enable_capability(); @@ -148,6 +146,9 @@ void x86_64_ap_boot(void) x86_64_cpu_priv_set(cpu); + tcb = this_task(); + UNUSED(tcb); + /* Configure interrupts */ up_irqinitialize();