Re: [Qemu-devel] [PATCH v4 16/35] tcg: Emit barriers with parallel_cpus

2016-10-05 Thread Alex Bennée

Richard Henderson  writes:

> Signed-off-by: Richard Henderson 

Reviewed-by: Alex Bennée 


> ---
>  tcg/tcg-op.c | 12 +---
>  1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
> index cdd61d6..bb2bfee 100644
> --- a/tcg/tcg-op.c
> +++ b/tcg/tcg-op.c
> @@ -150,17 +150,7 @@ void tcg_gen_op6(TCGContext *ctx, TCGOpcode opc, TCGArg 
> a1, TCGArg a2,
>
>  void tcg_gen_mb(TCGBar mb_type)
>  {
> -bool emit_barriers = true;
> -
> -#ifndef CONFIG_USER_ONLY
> -/* TODO: When MTTCG is available for system mode, we will check
> - * the following condition and enable emit_barriers
> - * (qemu_tcg_mttcg_enabled() && smp_cpus > 1)
> - */
> -emit_barriers = false;
> -#endif
> -
> -if (emit_barriers) {
> +if (parallel_cpus) {
>  tcg_gen_op1(_ctx, INDEX_op_mb, mb_type);
>  }
>  }


--
Alex Bennée



[Qemu-devel] [PATCH v4 16/35] tcg: Emit barriers with parallel_cpus

2016-09-16 Thread Richard Henderson
Signed-off-by: Richard Henderson 
---
 tcg/tcg-op.c | 12 +---
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index cdd61d6..bb2bfee 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -150,17 +150,7 @@ void tcg_gen_op6(TCGContext *ctx, TCGOpcode opc, TCGArg 
a1, TCGArg a2,
 
 void tcg_gen_mb(TCGBar mb_type)
 {
-bool emit_barriers = true;
-
-#ifndef CONFIG_USER_ONLY
-/* TODO: When MTTCG is available for system mode, we will check
- * the following condition and enable emit_barriers
- * (qemu_tcg_mttcg_enabled() && smp_cpus > 1)
- */
-emit_barriers = false;
-#endif
-
-if (emit_barriers) {
+if (parallel_cpus) {
 tcg_gen_op1(_ctx, INDEX_op_mb, mb_type);
 }
 }
-- 
2.5.5