From 0cc02efb23911bb77ce134224da15f82a26ca199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Mon, 25 Jul 2016 02:20:43 +0200 Subject: arch/riscv: Remove spinlock code from atomic.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These functions are not used anywhere. Change-Id: Ica1f4650e8774dd796be0aff00054f3698087816 Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/15829 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Ronald G. Minnich --- src/arch/riscv/include/atomic.h | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/arch/riscv/include') diff --git a/src/arch/riscv/include/atomic.h b/src/arch/riscv/include/atomic.h index 7141d7ba74..df455b9e5b 100644 --- a/src/arch/riscv/include/atomic.h +++ b/src/arch/riscv/include/atomic.h @@ -65,33 +65,4 @@ typedef struct { int lock; } spinlock_t; res; }) #endif -static inline void spinlock_lock(spinlock_t* lock) -{ - do - { - while (atomic_read(&lock->lock)) - ; - } while (atomic_swap(&lock->lock, -1)); - mb(); -} - -static inline void spinlock_unlock(spinlock_t* lock) -{ - mb(); - atomic_set(&lock->lock,0); -} - -static inline long spinlock_lock_irqsave(spinlock_t* lock) -{ - long flags = disable_irqsave(); - spinlock_lock(lock); - return flags; -} - -static inline void spinlock_unlock_irqrestore(spinlock_t* lock, long flags) -{ - spinlock_unlock(lock); - enable_irqrestore(flags); -} - #endif -- cgit v1.2.3