aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-11-17 19:17:18 -0800
committerRichard Henderson <richard.henderson@linaro.org>2023-01-04 16:20:01 -0800
commit50c9c512ac15e8eeb0ec63f6a92ba8e017e7676e (patch)
tree5cd65d10107bbaffb78e0fd9dd5b8ec0b499fde0 /hw/ppc
parentb3eb5b861a9ad5d885c15760cc3570fa3678b836 (diff)
downloadqemu-50c9c512ac15e8eeb0ec63f6a92ba8e017e7676e.zip
qemu-50c9c512ac15e8eeb0ec63f6a92ba8e017e7676e.tar.gz
qemu-50c9c512ac15e8eeb0ec63f6a92ba8e017e7676e.tar.bz2
hw/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_set_irq
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>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/ppc.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index dc86c1c..4e816c6 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -44,13 +44,9 @@ void ppc_set_irq(PowerPCCPU *cpu, int irq, int level)
{
CPUPPCState *env = &cpu->env;
unsigned int old_pending;
- bool locked = false;
/* We may already have the BQL if coming from the reset path */
- if (!qemu_mutex_iothread_locked()) {
- locked = true;
- qemu_mutex_lock_iothread();
- }
+ QEMU_IOTHREAD_LOCK_GUARD();
old_pending = env->pending_interrupts;
@@ -67,10 +63,6 @@ void ppc_set_irq(PowerPCCPU *cpu, int irq, int level)
trace_ppc_irq_set_exit(env, irq, level, env->pending_interrupts,
CPU(cpu)->interrupt_request);
-
- if (locked) {
- qemu_mutex_unlock_iothread();
- }
}
/* PowerPC 6xx / 7xx internal IRQ controller */