From 9308d25702d3b855376cacc9e7c5f5baa505ecd0 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 16 Jul 2024 18:05:26 -0400 Subject: kernel/amd64: mp: Lock only around cpu_startup() Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/mp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/amd64') 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); -- cgit v1.2.3