From bf1cd17a446cb99668d4398473e15b5613086ff5 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sun, 24 Sep 2023 17:33:48 +0200
Subject: SMP: Fix setting up initial gdt

We cannot access cpu_id_lut from the initial AP state, so update the
percpu segment after loading gdt.
---
 kern/startup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'kern')

diff --git a/kern/startup.c b/kern/startup.c
index 13acb850..177232fc 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -282,7 +282,7 @@ void cpu_launch_first_thread(thread_t th)
 {
 	int	mycpu;
 
-	mycpu = cpu_number_slow();
+	mycpu = cpu_number();
 
 	cpu_up(mycpu);
 
-- 
cgit v1.2.3