Skip to content

Commit

Permalink
tcg: Emit barriers with parallel_cpus
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 committed Oct 26, 2016
1 parent df79b99 commit 9168211
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tcg/tcg-op.c
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 9168211

Please sign in to comment.