mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
b3eb5b861a
commit
50c9c512ac
10
hw/ppc/ppc.c
10
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 */
|
||||
|
|
Loading…
Reference in New Issue