From 0b051108e06e58e0c6767cd62f6ef86a1b7b78dd Mon Sep 17 00:00:00 2001 From: br Date: Fri, 27 May 2016 17:58:10 +0000 Subject: [PATCH] Correct the implementation of dtrace_interrupt_disable/enable. Pointed out by: andrew Sponsored by: DARPA, AFRL Sponsored by: HEIF5 --- sys/cddl/dev/dtrace/riscv/dtrace_asm.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_asm.S b/sys/cddl/dev/dtrace/riscv/dtrace_asm.S index da2045813e89..21baa63483d6 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_asm.S +++ b/sys/cddl/dev/dtrace/riscv/dtrace_asm.S @@ -57,7 +57,8 @@ END(dtrace_membar_consumer) dtrace_icookie_t dtrace_interrupt_disable(void) */ ENTRY(dtrace_interrupt_disable) - csrci sstatus, 1 + csrrci a0, sstatus, SSTATUS_IE + andi a0, a0, SSTATUS_IE RET END(dtrace_interrupt_disable) @@ -65,7 +66,7 @@ END(dtrace_interrupt_disable) void dtrace_interrupt_enable(dtrace_icookie_t cookie) */ ENTRY(dtrace_interrupt_enable) - csrsi sstatus, 1 + csrs sstatus, a0 RET END(dtrace_interrupt_enable) /*