From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH 2/3] qemu/atomic: Drop special case for unsupported compiler
Date: Mon, 28 Sep 2020 14:58:58 +0200 [thread overview]
Message-ID: <20200928125859.734287-3-philmd@redhat.com> (raw)
In-Reply-To: <20200928125859.734287-1-philmd@redhat.com>
Since commit efc6c070aca ("configure: Add a test for the
minimum compiler version") the minimum compiler version
required for GCC is 4.8, which has the GCC BZ#36793 bug fixed.
We can safely remove the special case introduced in commit
a281ebc11a6 ("virtio: add missing mb() on notification").
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/qemu/atomic.h | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index c1d211a3519..8f4b3a80fbd 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -241,23 +241,6 @@
#else /* __ATOMIC_RELAXED */
-/*
- * We use GCC builtin if it's available, as that can use mfence on
- * 32-bit as well, e.g. if built with -march=pentium-m. However, on
- * i386 the spec is buggy, and the implementation followed it until
- * 4.3 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793).
- */
-#if defined(__i386__) || defined(__x86_64__)
-#if !QEMU_GNUC_PREREQ(4, 4)
-#if defined __x86_64__
-#define smp_mb() ({ asm volatile("mfence" ::: "memory"); (void)0; })
-#else
-#define smp_mb() ({ asm volatile("lock; addl $0,0(%%esp) " ::: "memory"); (void)0; })
-#endif
-#endif
-#endif
-
-
#ifdef __alpha__
#define smp_read_barrier_depends() asm volatile("mb":::"memory")
#endif
--
2.26.2
next prev parent reply other threads:[~2020-09-28 13:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 12:58 [PATCH 0/3] qemu/compiler: Remove unused special case code for GCC < 4.8 Philippe Mathieu-Daudé
2020-09-28 12:58 ` [PATCH 1/3] qemu/compiler: Simplify as all compilers support attribute 'gnu_printf' Philippe Mathieu-Daudé
2020-09-28 13:43 ` Peter Maydell
2020-09-28 14:04 ` Daniel P. Berrangé
2020-09-28 14:14 ` Peter Maydell
2020-09-28 14:23 ` Daniel P. Berrangé
2020-09-28 14:32 ` Peter Maydell
2020-09-28 14:39 ` Daniel P. Berrangé
2020-09-28 16:49 ` Paolo Bonzini
2020-09-28 12:58 ` Philippe Mathieu-Daudé [this message]
2020-09-28 13:36 ` [PATCH 2/3] qemu/atomic: Drop special case for unsupported compiler Peter Maydell
2020-11-25 15:07 ` Marc-André Lureau
2020-09-28 12:58 ` [PATCH 3/3] accel/tcg: Remove special case for GCC < 4.6 Philippe Mathieu-Daudé
2020-09-28 13:52 ` Peter Maydell
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=20200928125859.734287-3-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/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).