Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59020 )
Change subject: treewide: Remove unused spinlock functions ......................................................................
treewide: Remove unused spinlock functions
spin_is_locked and spin_unlock_wait are not used anywhere in the tree.
BUG=b:179699789 TEST=Build guybrush
Signed-off-by: Raul E Rangel rrangel@chromium.org Change-Id: I3e9a742e6b311d972a260039401bfd8f8766dd36 --- M src/arch/arm/include/armv4/arch/smp/spinlock.h M src/arch/x86/include/arch/smp/spinlock.h M src/include/smp/spinlock.h M src/soc/amd/common/psp_verstage/include/arch/smp/spinlock.h 4 files changed, 0 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/59020/1
diff --git a/src/arch/arm/include/armv4/arch/smp/spinlock.h b/src/arch/arm/include/armv4/arch/smp/spinlock.h index 0a3a4d4..6b680fd 100644 --- a/src/arch/arm/include/armv4/arch/smp/spinlock.h +++ b/src/arch/arm/include/armv4/arch/smp/spinlock.h @@ -4,8 +4,6 @@ #define _ARCH_SMP_SPINLOCK_H
#define DECLARE_SPIN_LOCK(x) -#define spin_is_locked(lock) 0 -#define spin_unlock_wait(lock) do {} while (0) #define spin_lock(lock) do {} while (0) #define spin_unlock(lock) do {} while (0)
diff --git a/src/arch/x86/include/arch/smp/spinlock.h b/src/arch/x86/include/arch/smp/spinlock.h index 0c06c22..19e9129 100644 --- a/src/arch/x86/include/arch/smp/spinlock.h +++ b/src/arch/x86/include/arch/smp/spinlock.h @@ -22,17 +22,6 @@ #define DECLARE_SPIN_LOCK(x) \ static spinlock_t x = SPIN_LOCK_UNLOCKED;
-/* - * Simple spin lock operations. There are two variants, one clears IRQ's - * on the local processor, one does not. - * - * We make no fairness assumptions. They have a cost. - */ -#define barrier() __asm__ __volatile__("" : : : "memory") -#define spin_is_locked(x) (*(volatile char *)(&(x)->lock) <= 0) -#define spin_unlock_wait(x) do { barrier(); } while (spin_is_locked(x)) -#undef barrier - #define spin_lock_string \ "\n1:\t" \ "lock ; decb %0\n\t" \ @@ -74,8 +63,6 @@ #else
#define DECLARE_SPIN_LOCK(x) -#define spin_is_locked(lock) 0 -#define spin_unlock_wait(lock) do {} while (0) #define spin_lock(lock) do {} while (0) #define spin_unlock(lock) do {} while (0)
diff --git a/src/include/smp/spinlock.h b/src/include/smp/spinlock.h index 8554aa05..15229e5 100644 --- a/src/include/smp/spinlock.h +++ b/src/include/smp/spinlock.h @@ -6,8 +6,6 @@ #else /* !CONFIG_SMP */
#define DECLARE_SPIN_LOCK(x) -#define spin_is_locked(lock) 0 -#define spin_unlock_wait(lock) do {} while (0) #define spin_lock(lock) do {} while (0) #define spin_unlock(lock) do {} while (0) #endif diff --git a/src/soc/amd/common/psp_verstage/include/arch/smp/spinlock.h b/src/soc/amd/common/psp_verstage/include/arch/smp/spinlock.h index 0a3a4d4..6b680fd 100644 --- a/src/soc/amd/common/psp_verstage/include/arch/smp/spinlock.h +++ b/src/soc/amd/common/psp_verstage/include/arch/smp/spinlock.h @@ -4,8 +4,6 @@ #define _ARCH_SMP_SPINLOCK_H
#define DECLARE_SPIN_LOCK(x) -#define spin_is_locked(lock) 0 -#define spin_unlock_wait(lock) do {} while (0) #define spin_lock(lock) do {} while (0) #define spin_unlock(lock) do {} while (0)