From patchwork Mon Jul 12 15:59:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 473137 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3076358jao; Mon, 12 Jul 2021 09:04:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7I1GGMrwYPEOyFTnpywDPVak+imGNtMgP7s8eCpwKxuQZ3/cGnBoZfSOAvY+vo1Iz+cB8 X-Received: by 2002:a1c:7201:: with SMTP id n1mr15645608wmc.4.1626105866405; Mon, 12 Jul 2021 09:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626105866; cv=none; d=google.com; s=arc-20160816; b=z1OyZhn14PCc/Vsgc8PXIcKbaEtvGmS2CbNRw3LEDZd2DA8ffY/S8sPzdPkOtRfV97 4ju0nnNaD09krnXTy0HKJVn+5XX11sn9wtB58c5A1UEK5v6ULpLAygWY9hIxrmv9WK4n 4E7wz9M5RDxmu6Psvb7m1unhOkl2xKS76usZP59dnOgKDbaCdXzTJ8Ly8lQOxnwqlsne yZt+bVsGtNnEm5g+ZkUYs5gFMQaqw5Gjg/lnV1aRsoTT+TlxNkNCLREmr54K+YM3aedY DmNRas4LF+0am4X3BhaGGMp8G2o21K5eYi/Ese5uO2B1sYnANmlsGarExTK5mXE7HYKi H7SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=12zIOb/Uugd1rcj+crbf+ro+UDiWl+wI2TjN8f63REs=; b=KcNHKiRlv+sC4LV9BUSUkLJsv1TfcZ8OZ2b5qt/m4xoytxa573CYYfqVJxmx9aEgXo jn3tPjrBq1COQJ6ZxSwXNf4M6+y+oY7oVVjexjeWepJYImLKMWi3HISi1STEH5mG5Myq 0YaWjOBmjxWGJUKOJty8PJCvmwQfz8HqATqrf5fwSWo+BVnWLUD1U0tXosTnu0iODTZe up5yAz8LlC4uwLRJJlP13a+Ss6+BpIZeYz+rEeayFNJL0G1cT17N+KOhioi5pU/kIqmE jryjGsw0fodCQbZ/95IjIWdXpfv7d4DASBq3PPtt9psTxy5EXb0m3soZ+CES7AowBkQQ ajdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="b/De0igE"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v7si27666153wmj.129.2021.07.12.09.04.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Jul 2021 09:04:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="b/De0igE"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2yPx-0005vQ-Bj for patch@linaro.org; Mon, 12 Jul 2021 12:04:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2yL4-0000Kc-FW for qemu-devel@nongnu.org; Mon, 12 Jul 2021 11:59:22 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:43565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2yL2-00073Z-VB for qemu-devel@nongnu.org; Mon, 12 Jul 2021 11:59:22 -0400 Received: by mail-pl1-x629.google.com with SMTP id b12so6526499plh.10 for ; Mon, 12 Jul 2021 08:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=12zIOb/Uugd1rcj+crbf+ro+UDiWl+wI2TjN8f63REs=; b=b/De0igEJNJbm9y+vAoJvzRWRuBwkM3y6zXA2RuWadfit+z01S7GAdu+uYiPd0NmwI OstlaQJ2fhZQVXlcyaTCfoQUBROJ1qqtiHrHUD4UIQfpbf0O3TY+PgtX8Xvaxom5lHk3 q7u+G+E7LLz2mlwXWio/QpB6NtK1/FLnvH7yn6pI5ZUUqtzc9+HcfHYMo3Ti8BtaJoSx wvNMsPoI7rnXND66if3MKkq2/+5iQMNicMrAyG01eSCxVU6iq2dxdvEhDKwNPDycg7C2 9kEYS8ZqAQM4cswAOlqBr69BC/LaRQG7ErtMtsCKoS1Mu1qZTCK2WBBxwtEJdWhk9VZ/ f/lg== 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:mime-version :content-transfer-encoding; bh=12zIOb/Uugd1rcj+crbf+ro+UDiWl+wI2TjN8f63REs=; b=h8TlCjqOXZ/TJWbr+iOv+ZVxuR6A6ytAUNwj8YwHDGN4bcg+Ulsvcu8Hi4YWvamCdf OM3okZsp22We9EudMPl/CfXgGpiTlQYOIO26N0Rh6AuwocP1zFaVispqYGvGaoSwrplU RQHPD5ZyEaXNtsM6H80YYcK54Rre2Y5i658VqEJV7IOUksQkTYrh3dC10PftQLpMH1JE g5kWKMYply0d53R7X5r3D2q6d2RoP9Q6BTTh5q4BNS77SY/grRroCbCb1PqyDMe+2tvk LhsvCMpIZcebUmARD/IGJpKJX0/fFUu4P0AqSgKqtIo73H8l9gCLvUiJ+RogADbg2vXX D16Q== X-Gm-Message-State: AOAM533Fe8RbH7qOWVEBNp5hPqxfvq/VgAH3S/ZQEYzYLFaHBUlumfYo OzQjTSpK4QkXo7g+/rffSavT28qbUn8OmA== X-Received: by 2002:a17:90a:bc83:: with SMTP id x3mr17906617pjr.17.1626105559408; Mon, 12 Jul 2021 08:59:19 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j16sm16745021pfi.165.2021.07.12.08.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 08:59:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/3] Atomic cleanup + clang-12 build fix Date: Mon, 12 Jul 2021 08:59:15 -0700 Message-Id: <20210712155918.1422519-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, pbonzini@redhat.com, crobinso@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The first two patches are not strictly required, but they were useful in tracking down the root problem here. I understand the logic behind the clang-12 warning, but I think it's a clear mistake that it should be enabled by default for a target where alignment is not enforced by default. I found over a dozen places where we would have to manually add QEMU_ALIGNED(8) to uint64_t declarations in order to suppress all of the instances. IMO there's no point fighting this. r~ Richard Henderson (3): qemu/atomic: Remove pre-C11 atomic fallbacks qemu/atomic: Use macros for CONFIG_ATOMIC64 configure: Conditionally disable clang-12 -Watomic-alignment configure | 23 +++-- include/qemu/atomic.h | 229 +++--------------------------------------- 2 files changed, 31 insertions(+), 221 deletions(-) -- 2.25.1