From nobody Tue Feb 10 00:58:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601297964; cv=none; d=zohomail.com; s=zohoarc; b=MnWtwRhbXSCbsSL1dXiwep2NhQ307brYnKDq3Nq/ihUrbj+c/6NK1QpiBRucVvs2Lv/agUJeLe6+ofhjbRlyp6YlZlHR6TXfY1vOx13/zq10wAg1l2MoSkgOfKIfcobu/hP337ezfsHttMQA9JtcH9+ugv5oPw+DMEzUTlkJYkw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601297964; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=v6PGjLSw3kSK6ARw73eSqwNVErLiz9tgI0uJe1vk+sQ=; b=j6Fw/nWXoOW473gMNv2SkeWhJVAVuNGyOL2H6rn30pqtT27T+oHpTmQbwtRpfIVbh15medQobpwKe3RB/ZCMHeZ9GIdD0y1RU4EYezwl8ERw66BOG8L/1ogqnmL4I4/Lg/xrpwi1Zsje1cjM8EVEvBdEKWjlHyBJ31MH98RoY1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601297964107858.2791745083554; Mon, 28 Sep 2020 05:59:24 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-94-eUDN1RHiNKOrwK90LQlfkA-1; Mon, 28 Sep 2020 08:59:14 -0400 Received: by mail-wm1-f71.google.com with SMTP id x6so361496wmi.1 for ; Mon, 28 Sep 2020 05:59:14 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id c16sm1502529wrx.31.2020.09.28.05.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 05:59:12 -0700 (PDT) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601297962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v6PGjLSw3kSK6ARw73eSqwNVErLiz9tgI0uJe1vk+sQ=; b=b3CaFbQCUMzLY/AmvVu9OUV5kePL74Pl8NgTx5JQ6wHTSVdOr0LqQr1z77hVDXSM3ZIdMS 9J53ucofxCl6tAdELDAfdpetnmMBW9MHjJsaM4/d4MSNtrVBBo4gE/bSRe4VbAjBEsKivx Z6toUdAiJWx4aVarnsVcZnXHJ3xse4Y= X-MC-Unique: eUDN1RHiNKOrwK90LQlfkA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v6PGjLSw3kSK6ARw73eSqwNVErLiz9tgI0uJe1vk+sQ=; b=TRY7YWBvzBzVT91iNrUp3db3G0kFZFpGOSDeYui4lSHr+XxKbmyhcqh4o20txVDxaP SmNJDbHSi9ovHF9HdrCm0Xl9+WF5uL3FEfTjSKWcg2hvMy3Bjs/DIg/jAfMvyTSnoVJ5 4UHNCfZE2Cv655RLvVpUnAY6MuTx+R7U8xY5ZOxcpB+RSWHAhi68v5YHD0LdD0btrrRs uUC8birhlMom8aPu8EcRCytFf0/efdY6/UXnwYybZrcwRlUtJzOZKRgKoVz2fJx7EfIY jM+JXiEaRR8+VOepDvy+r4BZTIWDK29EqUC2Et4nC/bt9c+ZneI48QNAVZNQXJtIqPwT ehDA== X-Gm-Message-State: AOAM530FQSGIgtdWPyP6q4kLs6QFfO9sDp0DbycJnFVCCMIUv60WlD2S AwLgMYuwe4K1xDH5NhKNdLCxBVpEOXfRdLYTSeHbDyKyYj7SlW9OClePbu7ONdjWAsMXBEEJMNC 1H4mhk2pl475SWQ== X-Received: by 2002:adf:fd12:: with SMTP id e18mr1677851wrr.96.1601297953012; Mon, 28 Sep 2020 05:59:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy51qV0gl8YBMCmmGG7e3hY0ATWkyT+tJ+uJmjlEfM2JwyBMN36ZcpD7qVM0V/bebKJrKynpA== X-Received: by 2002:adf:fd12:: with SMTP id e18mr1677831wrr.96.1601297952846; Mon, 28 Sep 2020 05:59:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Paolo Bonzini , Richard Henderson , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/3] qemu/atomic: Drop special case for unsupported compiler Date: Mon, 28 Sep 2020 14:58:58 +0200 Message-Id: <20200928125859.734287-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200928125859.734287-1-philmd@redhat.com> References: <20200928125859.734287-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @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=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 @@ =20 #else /* __ATOMIC_RELAXED */ =20 -/* - * We use GCC builtin if it's available, as that can use mfence on - * 32-bit as well, e.g. if built with -march=3Dpentium-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=3D36793). - */ -#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 --=20 2.26.2