Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59547 )
Change subject: Revert "x86/smp/spinlock: Disable thread coop when taking spinlock" ......................................................................
Revert "x86/smp/spinlock: Disable thread coop when taking spinlock"
This reverts commit a98d302fe9dcce13a1c60b4bdfaf2e713fd11b51.
No longer required since each spin_lock() invocation now calls thread_coop_disable before grabbing the lock.
BUG=b:179699789 TEST=Boot guybrush to OS
Signed-off-by: Raul E Rangel rrangel@chromium.org Change-Id: Icf61fb43a427f6f6bb3640a770ab0bf0e760f690 --- M src/arch/x86/include/arch/smp/spinlock.h 1 file changed, 0 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/59547/1
diff --git a/src/arch/x86/include/arch/smp/spinlock.h b/src/arch/x86/include/arch/smp/spinlock.h index c7008c1..f8fffdb 100644 --- a/src/arch/x86/include/arch/smp/spinlock.h +++ b/src/arch/x86/include/arch/smp/spinlock.h @@ -3,8 +3,6 @@ #ifndef ARCH_SMP_SPINLOCK_H #define ARCH_SMP_SPINLOCK_H
-#include <thread.h> - /* * Your basic SMP spinlocks, allowing only a single CPU anywhere */ @@ -52,16 +50,10 @@ __asm__ __volatile__( spin_lock_string : "=m" (lock->lock) : : "memory"); - - /* Switching contexts while holding a spinlock will lead to deadlocks */ - thread_coop_disable(); - }
static __always_inline void spin_unlock(spinlock_t *lock) { - thread_coop_enable(); - __asm__ __volatile__( spin_unlock_string : "=m" (lock->lock) : : "memory");