diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2016-07-25 02:20:43 +0200 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2016-07-28 18:18:44 +0200 |
commit | 0cc02efb23911bb77ce134224da15f82a26ca199 (patch) | |
tree | a313a114ddb6fffe2e2e9056a1f7640c0e679b3f /src | |
parent | a90f41bdd71bd3f98c683702f90247e674a50896 (diff) |
arch/riscv: Remove spinlock code from atomic.h
These functions are not used anywhere.
Change-Id: Ica1f4650e8774dd796be0aff00054f3698087816
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/15829
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/riscv/include/atomic.h | 29 |
1 files changed, 0 insertions, 29 deletions
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 |