qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 29/35] exec: drop BQL from cpu_reset_interrupt


From: Emilio G. Cota
Subject: [Qemu-devel] [PATCH 29/35] exec: drop BQL from cpu_reset_interrupt
Date: Mon, 17 Sep 2018 12:30:57 -0400

From: Paolo Bonzini <address@hidden>

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 <address@hidden>
Cc: Richard Henderson <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]