From 4bcd00fc3c2d1871fdabadc89bc54dc5aa290dd9 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 3 May 2023 20:19:56 +0100 Subject: [PATCH] x86_64: smp: set AP idle thread ID to CPU ID --- arch/x86_64/acpi/smp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86_64/acpi/smp.cpp b/arch/x86_64/acpi/smp.cpp index e0e8471..7aedba3 100644 --- a/arch/x86_64/acpi/smp.cpp +++ b/arch/x86_64/acpi/smp.cpp @@ -30,6 +30,7 @@ extern "C" void ap_trampoline_exit(void) this_cpu->c_data = self; struct thread *this_thread = create_idle_thread(); + this_thread->tr_id = __this_ap_id; this_thread->tr_kstack = (struct vm_page *)__ap_stack_page; self->c_rq.rq_idle = self->c_rq.rq_cur = this_thread;