diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-16 18:05:26 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-16 18:05:26 -0400 |
commit | 9308d25702d3b855376cacc9e7c5f5baa505ecd0 (patch) | |
tree | 67f87031ecad4898b44247f8434485113cb3899e /sys | |
parent | 342c127a05a23913845f80c200af9a30d0c06068 (diff) |
kernel/amd64: mp: Lock only around cpu_startup()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/mp.c | 4 |
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); |