From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za4Hp-0003z9-Ms for qemu-devel@nongnu.org; Thu, 10 Sep 2015 12:01:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Za4Hl-0004n3-7F for qemu-devel@nongnu.org; Thu, 10 Sep 2015 12:01:21 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za4Hl-0004mW-1k for qemu-devel@nongnu.org; Thu, 10 Sep 2015 12:01:17 -0400 Received: by wicgb1 with SMTP id gb1so30861664wic.1 for ; Thu, 10 Sep 2015 09:01:16 -0700 (PDT) References: <1440375847-17603-1-git-send-email-cota@braap.org> <1440375847-17603-20-git-send-email-cota@braap.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1440375847-17603-20-git-send-email-cota@braap.org> Date: Thu, 10 Sep 2015 17:01:14 +0100 Message-ID: <87twr28drp.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC 19/38] tcg: add tcg_gen_smp_rmb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: mttcg@listserver.greensocs.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, guillaume.delbergue@greensocs.com, pbonzini@redhat.com, Frederic Konrad Emilio G. Cota writes: > Signed-off-by: Emilio G. Cota > --- > tcg/tcg-op.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h > index 52482c0..3ec9f13 100644 > --- a/tcg/tcg-op.h > +++ b/tcg/tcg-op.h > @@ -716,6 +716,16 @@ static inline void tcg_gen_fence_full(void) > tcg_gen_op0(&tcg_ctx, INDEX_op_fence_full); > } > > +#if defined(__i386__) || defined(__x86_64__) || defined(__s390x__) > +static inline void tcg_gen_smp_rmb(void) > +{ } > +#else > +static inline void tcg_gen_smp_rmb(void) > +{ > + tcg_gen_fence_load(); > +} > +#endif This seems a little pointless wrapping up tcg_gen_fence_load. Could the magic dealing with the backend not be done with something like TCG_TARGET_HAS_fence_load. On the x86/x86_64 backends this could then NOP away. > + > /* QEMU specific operations. */ > > #ifndef TARGET_LONG_BITS -- Alex Bennée