Attention is currently required from: Furquan Shaikh, Julius Werner. Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56320 )
Change subject: x86/smp/spinlock: Disable thread coop when taking spinlock ......................................................................
Patch Set 1:
(1 comment)
File src/arch/x86/include/arch/smp/spinlock.h:
https://review.coreboot.org/c/coreboot/+/56320/comment/74dccd0a_8f743793 PS1, Line 61: lock->coop = thread_coop_enabled();
These spinlocks are primarily for the actual SMP in ramstage, not for the thread mechanism... […]
So I had the same thought as your did about storing it in the thread structure, but there is only 1 thread that can hold the spinlock. So once the core grabs the spinlock it effectively owns the spinlock struct. So storing the coop state into the struct will not result in anything being overridden. Do you both think we should still head down the semaphore route?