aarch64: flip smp mutex after doing init for better startup synchronization

This commit is contained in:
K. Lange 2022-02-09 21:01:09 +09:00
parent 2c5a6db126
commit b55964e451

View File

@ -55,9 +55,6 @@ void ap_start(uint64_t core_id) {
dprintf("smp: core %zu is online\n", core_id);
_smp_mutex = 1;
asm volatile ("isb" ::: "memory");
extern void arch_set_core_base(uintptr_t base);
arch_set_core_base((uintptr_t)&processor_local_data[core_id]);
@ -75,6 +72,9 @@ void ap_start(uint64_t core_id) {
timer_start();
_smp_mutex = 1;
asm volatile ("isb" ::: "memory");
switch_next();
}