Skip to contentSkip to conversation

target-nios2: take BQL around interrupt check

PATCH New Paolo Bonzini 1 participant 1 message Mar 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-nios2: take BQL around interrupt check

The interrupt controller does not have its own locking.

---
 target/nios2/op_helper.c | 3 +++
 1 file changed, 3 insertions(+)
target/nios2/op_helper.c +3 -0
index 538853c..efb1c48 100644
@@ -21,6 +21,7 @@
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/cpu_ldst.h"
+#include "qemu/main-loop.h"
 
 #if !defined(CONFIG_USER_ONLY)
 void helper_mmu_read_debug(CPUNios2State *env, uint32_t rn)
@@ -35,7 +36,9 @@ void helper_mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v)
 
 void helper_check_interrupts(CPUNios2State *env)
 {
+    qemu_mutex_lock_iothread();
     nios2_check_interrupts(env);
+    qemu_mutex_unlock_iothread();
 }
 #endif /* !CONFIG_USER_ONLY */
 
Signature · 1 line
2.9.3