summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/mp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/mp.c b/sys/arch/amd64/amd64/mp.c
index 804bca6..3d92e9f 100644
--- a/sys/arch/amd64/amd64/mp.c
+++ b/sys/arch/amd64/amd64/mp.c
@@ -50,11 +50,11 @@ ap_trampoline(struct limine_smp_info *si)
static struct spinlock lock = {0};
struct cpu_info *ci;
- spinlock_acquire(&lock);
ci = dynalloc(sizeof(*ci));
__assert(ci != NULL);
-
memset(ci, 0, sizeof(*ci));
+
+ spinlock_acquire(&lock);
cpu_startup(ci);
spinlock_release(&lock);