[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 07/43] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_maybe_i
From: |
Richard Henderson |
Subject: |
[PATCH v5 07/43] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_maybe_interrupt |
Date: |
Sat, 24 Dec 2022 15:56:44 -0800 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/ppc/excp_helper.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index add4d54ae7..287659c74d 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -2163,22 +2163,13 @@ static int ppc_next_unmasked_interrupt(CPUPPCState *env)
void ppc_maybe_interrupt(CPUPPCState *env)
{
CPUState *cs = env_cpu(env);
- bool locked = false;
-
- if (!qemu_mutex_iothread_locked()) {
- locked = true;
- qemu_mutex_lock_iothread();
- }
+ QEMU_IOTHREAD_LOCK_GUARD();
if (ppc_next_unmasked_interrupt(env)) {
cpu_interrupt(cs, CPU_INTERRUPT_HARD);
} else {
cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD);
}
-
- if (locked) {
- qemu_mutex_unlock_iothread();
- }
}
#if defined(TARGET_PPC64)
--
2.34.1
- [PATCH v5 00/43] tcg misc patches, Richard Henderson, 2022/12/24
- [PATCH v5 02/43] meson: Move CONFIG_TCG_INTERPRETER to config_host, Richard Henderson, 2022/12/24
- [PATCH v5 04/43] tcg: Cleanup trailing whitespace, Richard Henderson, 2022/12/24
- [PATCH v5 03/43] tcg/s390x: Fix coding style, Richard Henderson, 2022/12/24
- [PATCH v5 05/43] qemu/main-loop: Introduce QEMU_IOTHREAD_LOCK_GUARD, Richard Henderson, 2022/12/24
- [PATCH v5 07/43] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_maybe_interrupt,
Richard Henderson <=
- [PATCH v5 06/43] hw/mips: Use QEMU_IOTHREAD_LOCK_GUARD in cpu_mips_irq_request, Richard Henderson, 2022/12/24
- [PATCH v5 08/43] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in cpu_interrupt_exittb, Richard Henderson, 2022/12/24
- [PATCH v5 01/43] tcg: convert tcg/README to rst, Richard Henderson, 2022/12/24
- [PATCH v5 09/43] target/riscv: Use QEMU_IOTHREAD_LOCK_GUARD in riscv_cpu_update_mip, Richard Henderson, 2022/12/24
- [PATCH v5 12/43] tcg: Tidy tcg_reg_alloc_op, Richard Henderson, 2022/12/24
- [PATCH v5 11/43] accel/tcg: Use QEMU_IOTHREAD_LOCK_GUARD in io_readx/io_writex, Richard Henderson, 2022/12/24
- [PATCH v5 13/43] tcg: Remove TCG_TARGET_STACK_GROWSUP, Richard Henderson, 2022/12/24
- [PATCH v5 14/43] tci: MAX_OPC_PARAM_IARGS is no longer used, Richard Henderson, 2022/12/24
- [PATCH v5 10/43] hw/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_set_irq, Richard Henderson, 2022/12/24