summaryrefslogtreecommitdiff
path: root/src/arch/riscv/include/atomic.h
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2016-08-09 02:07:10 +0200
committerRonald G. Minnich <rminnich@gmail.com>2016-08-11 21:11:11 +0200
commitc42b5917af50a1a0b6a64330e9cdd953c46102b7 (patch)
tree443967cac32e6bc185a6af4f76dad591e92be523 /src/arch/riscv/include/atomic.h
parent6e1884ff5de15aff746b7345866290acfb9a9ec4 (diff)
arch/riscv: Update encoding.h and dependent files
I copied it from commit e10d2def7d of spike and made sure the copyright header is still there. Change-Id: Ie8b56cd2f4855b97d36a112a195866f4ff0feec5 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/15832 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/riscv/include/atomic.h')
-rw-r--r--src/arch/riscv/include/atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/riscv/include/atomic.h b/src/arch/riscv/include/atomic.h
index 8f10b9dfa4..639b54a895 100644
--- a/src/arch/riscv/include/atomic.h
+++ b/src/arch/riscv/include/atomic.h
@@ -30,8 +30,8 @@
#include <arch/encoding.h>
-#define disable_irqsave() clear_csr(sstatus, SSTATUS_IE)
-#define enable_irqrestore(flags) set_csr(sstatus, (flags) & SSTATUS_IE)
+#define disable_irqsave() clear_csr(mstatus, MSTATUS_MIE)
+#define enable_irqrestore(flags) set_csr(mstatus, (flags) & MSTATUS_MIE)
typedef struct { int lock; } spinlock_t;
#define SPINLOCK_INIT {0}