summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm/include/armv4/arch/smp/spinlock.h1
-rw-r--r--src/arch/x86/include/arch/smp/spinlock.h2
-rw-r--r--src/include/smp/spinlock.h1
-rw-r--r--src/soc/amd/picasso/psp_verstage/include/arch/smp/spinlock.h1
4 files changed, 1 insertions, 4 deletions
diff --git a/src/arch/arm/include/armv4/arch/smp/spinlock.h b/src/arch/arm/include/armv4/arch/smp/spinlock.h
index 4d40f3304f..0a3a4d4676 100644
--- a/src/arch/arm/include/armv4/arch/smp/spinlock.h
+++ b/src/arch/arm/include/armv4/arch/smp/spinlock.h
@@ -4,7 +4,6 @@
#define _ARCH_SMP_SPINLOCK_H
#define DECLARE_SPIN_LOCK(x)
-#define barrier() do {} while (0)
#define spin_is_locked(lock) 0
#define spin_unlock_wait(lock) do {} while (0)
#define spin_lock(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 a05d47a233..799ac2c8b8 100644
--- a/src/arch/x86/include/arch/smp/spinlock.h
+++ b/src/arch/x86/include/arch/smp/spinlock.h
@@ -29,6 +29,7 @@ typedef struct {
#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" \
@@ -65,7 +66,6 @@ static __always_inline void spin_unlock(spinlock_t *lock)
#else
#define DECLARE_SPIN_LOCK(x)
-#define barrier() do {} while (0)
#define spin_is_locked(lock) 0
#define spin_unlock_wait(lock) do {} while (0)
#define spin_lock(lock) do {} while (0)
diff --git a/src/include/smp/spinlock.h b/src/include/smp/spinlock.h
index 40dd602c03..8554aa0589 100644
--- a/src/include/smp/spinlock.h
+++ b/src/include/smp/spinlock.h
@@ -6,7 +6,6 @@
#else /* !CONFIG_SMP */
#define DECLARE_SPIN_LOCK(x)
-#define barrier() do {} while (0)
#define spin_is_locked(lock) 0
#define spin_unlock_wait(lock) do {} while (0)
#define spin_lock(lock) do {} while (0)
diff --git a/src/soc/amd/picasso/psp_verstage/include/arch/smp/spinlock.h b/src/soc/amd/picasso/psp_verstage/include/arch/smp/spinlock.h
index 4d40f3304f..0a3a4d4676 100644
--- a/src/soc/amd/picasso/psp_verstage/include/arch/smp/spinlock.h
+++ b/src/soc/amd/picasso/psp_verstage/include/arch/smp/spinlock.h
@@ -4,7 +4,6 @@
#define _ARCH_SMP_SPINLOCK_H
#define DECLARE_SPIN_LOCK(x)
-#define barrier() do {} while (0)
#define spin_is_locked(lock) 0
#define spin_unlock_wait(lock) do {} while (0)
#define spin_lock(lock) do {} while (0)