From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-barrier: Fix compiler version check for future gcc versions
Date: Mon, 8 Oct 2012 22:01:20 +0200 [thread overview]
Message-ID: <20121008200120.GB17303@redhat.com> (raw)
In-Reply-To: <1349298662-16666-1-git-send-email-sw@weilnetz.de>
On Wed, Oct 03, 2012 at 11:11:02PM +0200, Stefan Weil wrote:
> The current check will give a wrong result for gcc-5.x with x < 4.
> Using QEMU_GNUC_PREREQ is simpler and fixes that issue.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>
> With current gcc versions (gcc-4.x) there is no problem.
> Nevertheless, I suggest to fix this in stable versions, too.
>
> Regards
>
> Stefan Weil
ACK for stable tree.
> qemu-barrier.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qemu-barrier.h b/qemu-barrier.h
> index 7e11197..16f0942 100644
> --- a/qemu-barrier.h
> +++ b/qemu-barrier.h
> @@ -19,7 +19,7 @@
> * mfence on 32 bit as well, e.g. if built with -march=pentium-m.
> * However, on i386, there seem to be known bugs as recently as 4.3.
> * */
> -#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 4
> +#if QEMU_GNUC_PREREQ(4, 4)
> #define smp_mb() __sync_synchronize()
> #else
> #define smp_mb() asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
> --
> 1.7.10
next prev parent reply other threads:[~2012-10-08 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 21:11 [Qemu-devel] [PATCH] qemu-barrier: Fix compiler version check for future gcc versions Stefan Weil
2012-10-05 13:48 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-10-08 20:01 ` Michael S. Tsirkin [this message]
2012-10-08 20:57 ` [Qemu-devel] " Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121008200120.GB17303@redhat.com \
--to=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).