[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
- Re: [Qemu-devel] [PATCH 21/35] target/openrisc: access cpu->interrupt_request with atomics, (continued)
- [Qemu-devel] [PATCH 24/35] target/sh4: access cpu->interrupt_request with atomics, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 27/35] hw/sparc64: access cpu->interrupt_request with atomics, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 26/35] target/unicore32: access cpu->interrupt_request with atomics, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 30/35] tcg: drop BQL assertion from tcg_handle_interrupt, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 29/35] exec: drop BQL from cpu_reset_interrupt,
Emilio G. Cota <=
- [Qemu-devel] [PATCH 22/35] target/ppc: access cpu->interrupt_request with atomics, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 23/35] target/s390x: access cpu->interrupt_request with atomics, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 31/35] translate-all: drop BQL assertion from cpu_interrupt, Emilio G. Cota, 2018/09/17
- [Qemu-devel] [PATCH 32/35] target/i386/kvm: do not acquire the BQL to call cpu_reset_interrupt, Emilio G. Cota, 2018/09/17