From c2c38f5fdea0579d1a64ce63c00737bbe3ca5759 Mon Sep 17 00:00:00 2001
From: Raul E Rangel <rrangel@chromium.org>
Date: Fri, 8 Oct 2021 13:10:38 -0600
Subject: arch/x86,cpu/x86,lib/thread: Remove usage of cpu_info from lib/thread

We only ever start and execute threads on the BSP. By explicitly
checking to see if the CPU is the BSP we can remove the dependency on
cpu_info. With this change we can in theory enable threads in all
stages.

BUG=b:194391185, b:179699789
TEST=Boot guybrush to OS and verify coop multithreading still works

Suggested-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Iea4622d52c36d529e100b7ea55f32c334acfdf3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58199
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
 src/arch/x86/include/arch/cpu.h | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'src/arch/x86')

diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h
index 8e96fae2c2..9a3b63d6b3 100644
--- a/src/arch/x86/include/arch/cpu.h
+++ b/src/arch/x86/include/arch/cpu.h
@@ -231,9 +231,6 @@ struct thread;
 struct cpu_info {
 	struct device *cpu;
 	size_t index;
-#if CONFIG(COOP_MULTITASKING)
-	struct thread *thread;
-#endif
 };
 
 /*
-- 
cgit v1.2.3