OSDN Git Service

tcg: Emit barriers with parallel_cpus
authorRichard Henderson <rth@twiddle.net>
Fri, 16 Sep 2016 16:24:20 +0000 (09:24 -0700)
committerRichard Henderson <rth@twiddle.net>
Wed, 26 Oct 2016 15:29:01 +0000 (08:29 -0700)
Reviewed-by: Emilio G. Cota <cota@braap.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/tcg-op.c

index cdd61d6..bb2bfee 100644 (file)
@@ -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(&tcg_ctx, INDEX_op_mb, mb_type);
     }
 }