]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/nios2: take BQL around interrupt check
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 1 Mar 2017 10:28:04 +0000 (11:28 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Mar 2017 12:26:37 +0000 (13:26 +0100)
The interrupt controller does not have its own locking.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/nios2/op_helper.c

index 538853cda720b6f2cb9ffa2091296d74815e9b61..efb1c489c99d7f81b67afa20c1cf1589926194b5 100644 (file)
@@ -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 */