From: Paolo Bonzini <pbonzini@redhat.com>
Now that cpu->interrupt_request is accessed with atomics,
we can drop the BQL around cpu_reset_interrupt, which is a
step towards not taking the BQL mandatorily in cpu_exec_interrupt.
Cc: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
qom/cpu.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/qom/cpu.c b/qom/cpu.c
index e2dfbde7c4..6afe428069 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -94,19 +94,9 @@ static void cpu_common_get_memory_mapping(CPUState *cpu,
error_setg(errp, "Obtaining memory mappings is unsupported on this CPU.");
}
-/* Resetting the IRQ comes from across the code base so we take the
- * BQL here if we need to. cpu_interrupt assumes it is held.*/
void cpu_reset_interrupt(CPUState *cpu, int mask)
{
- bool need_lock = !qemu_mutex_iothread_locked();
-
- if (need_lock) {
- qemu_mutex_lock_iothread();
- }
atomic_and(&cpu->interrupt_request, ~mask);
- if (need_lock) {
- qemu_mutex_unlock_iothread();
- }
}
void cpu_exit(CPUState *cpu)
--
2.17.1