[Qemu-devel] [PATCH 33/35] target/ppc: do not acquire the BQL to call cpu_interrupt

Emilio G. Cota posted 35 patches 7 years, 1 month ago
[Qemu-devel] [PATCH 33/35] target/ppc: do not acquire the BQL to call cpu_interrupt
Posted by Emilio G. Cota 7 years, 1 month ago
It's not needed anymore.

Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 target/ppc/helper_regs.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/target/ppc/helper_regs.h b/target/ppc/helper_regs.h
index 5efd18049e..801eba83e7 100644
--- a/target/ppc/helper_regs.h
+++ b/target/ppc/helper_regs.h
@@ -101,13 +101,7 @@ static inline void hreg_compute_hflags(CPUPPCState *env)
 
 static inline void cpu_interrupt_exittb(CPUState *cs)
 {
-    if (!qemu_mutex_iothread_locked()) {
-        qemu_mutex_lock_iothread();
-        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-        qemu_mutex_unlock_iothread();
-    } else {
-        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-    }
+    cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
 }
 
 static inline int hreg_store_msr(CPUPPCState *env, target_ulong value,
-- 
2.17.1


Re: [Qemu-devel] [PATCH 33/35] target/ppc: do not acquire the BQL to call cpu_interrupt
Posted by David Gibson 7 years, 1 month ago
On Mon, Sep 17, 2018 at 12:31:01PM -0400, Emilio G. Cota wrote:
> It's not needed anymore.
> 
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: qemu-ppc@nongnu.org
> Signed-off-by: Emilio G. Cota <cota@braap.org>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  target/ppc/helper_regs.h | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/target/ppc/helper_regs.h b/target/ppc/helper_regs.h
> index 5efd18049e..801eba83e7 100644
> --- a/target/ppc/helper_regs.h
> +++ b/target/ppc/helper_regs.h
> @@ -101,13 +101,7 @@ static inline void hreg_compute_hflags(CPUPPCState *env)
>  
>  static inline void cpu_interrupt_exittb(CPUState *cs)
>  {
> -    if (!qemu_mutex_iothread_locked()) {
> -        qemu_mutex_lock_iothread();
> -        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
> -        qemu_mutex_unlock_iothread();
> -    } else {
> -        cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
> -    }
> +    cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
>  }
>  
>  static inline int hreg_store_msr(CPUPPCState *env, target_ulong value,

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson