diff mbox series

[29/35] exec: drop BQL from cpu_reset_interrupt

Message ID 20180917163103.6113-30-cota@braap.org
State New
Headers show
Series exec: drop BQL from interrupt handling | expand

Commit Message

Emilio Cota Sept. 17, 2018, 4:30 p.m. UTC
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(-)

Comments

Richard Henderson Sept. 18, 2018, 9:11 p.m. UTC | #1
On 9/17/18 9:30 AM, Emilio G. Cota wrote:
> 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(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

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)