From patchwork Fri Jan 14 15:37:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 531978 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp605350imp; Fri, 14 Jan 2022 07:54:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfMOd5mublc/rJvqZcVFchdnhgjJHUTCnDgfxK+qoMUsZIXuBkaUyrRzH8VMXMSAe114LZ X-Received: by 2002:a25:f211:: with SMTP id i17mr12324492ybe.239.1642175644840; Fri, 14 Jan 2022 07:54:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642175644; cv=none; d=google.com; s=arc-20160816; b=gf8V8dC8qLowWhUnKGN9rYs8PfJ2cX85+N5jA+egzuswd9N8hY43e4GYdcG2vFINsi xTgkhmLgtkNMSNa27w02xtXnNGnociYDwC0GWXxiAFzOAIrFMaQZbQgI/rrgRg2J4bv5 qzAc/Xk8Hcb8EBI+ys/PRzBLKyuOwz1ZEP0GuvsHn858eiGqH0nCivOKWFPjIO+3FhFr QTtLCYThkUd2UDo0gvmzzAtP/CNsP49Iw4n7Qai4blZzZjkuoM3ldDePwNwdpF46nDtq xDxQqR9FuiKlnmyWtzKVqYLLt8WYORR80GYEkO/YRu3ejrRM/ieAQGW3bh0S9L6Wtb9R cobA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9oAiFDmRNiyFx5akgXGrz8fMLaOCHj0Qubxkn3ACL54=; b=FEY45zeh2cqXxVLfVJoHvj///z+PpWA/TGfRCC0etAkdsLpcdODNNeXsfA7mHMTSug xuZBlYmKljYPcoc5JQAVKyWY4lZk7dAoaRRnePgg6O1NiDpCKCCnXhXoGcQxe413i4gt AGG2RRvzrpvNTT1cYaj1bc231BamYeq93PZTQNCVCTXYDsXEsPz9SNB7ALoztl0RUrmK wJNBUO101QCoOvTYM+gKQvuGzLLOw9YGlZjsm5oZYPZkRvsgdGMHQyWpUGm22WToFeoa Ce3CS3/h72LoSOKC682PLn/zgxUy0t6PEIe1Wp0guAGJP142NYUPgo3GtdfoI7u1i5on sw6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oUH52jyp; 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=pass (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 w67si4681531yba.332.2022.01.14.07.54.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jan 2022 07:54:04 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=oUH52jyp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8Otw-00016K-BU for patch@linaro.org; Fri, 14 Jan 2022 10:54:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Oe2-00087Z-P2 for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:38 -0500 Received: from [2a00:1450:4864:20::42c] (port=46007 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8Oe0-0000c8-Fo for qemu-devel@nongnu.org; Fri, 14 Jan 2022 10:37:38 -0500 Received: by mail-wr1-x42c.google.com with SMTP id q8so16203933wra.12 for ; Fri, 14 Jan 2022 07:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9oAiFDmRNiyFx5akgXGrz8fMLaOCHj0Qubxkn3ACL54=; b=oUH52jypv1ZTywTRXYBzZXthG7h05bVSWQse2I+ONsHk68CDPDAV4KmveWP7RdNmDN iW+AOLXmgcTvBCTSM7X3xhPV8KAnOUdDi2NBei9Y4yfQj7p0aw+CbaPBgekhMsm6Vu6d CR6BEn+nWW/DYorm1P1HXu8+i1dUc6TPA54zICzM+1XSEvzjLYgmJoktIcgUj2NiBCoE ta3fdf7loBo00LyETyBNX2q91AIJFPl3gMX/r96qhCFZM14m15gpdfFkTYXiHqTi6Kgh Lh+IihBdJY2LBJibjmST5yp4m/ZiuDH8dWixB9AU4ejrT+BXUJ0YclCNxfIQG//Cogsp yCDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9oAiFDmRNiyFx5akgXGrz8fMLaOCHj0Qubxkn3ACL54=; b=EHZZ2xa0QdgYK6pCD5jCNX/muWjsEtJi6hR7SmO6rVJTyKIybCCiYIR13+8SiVHBfv zaJEWVCImuC8GkBS/pXFu67RDyB3QLn8HRr9nkGMOHDDEfGVayCyzpMg++hj9HCRumC3 0zXzLuscT1aaafcT1rgCWq+8M4F69Se5WPnxepmNH79sCJWhZ/HMf/NV4aC5b5c7C/H0 U8wCDIRZkChFkzvVakkHzud3ktDf4X0oJocPda8fOtXpOnrZuQORuO+BCDBBwPsYNNct rNC39TdY1Ck8clT/SVWxr8YrBsHVsWdqEC8YFZypOvn/QFv/T9NTmq+xo8adLb3wX24M KW2A== X-Gm-Message-State: AOAM53018GOa9wy0kd8umdtkVBq806V/81l+EpzKSLL9cZ3T9/ttw5C6 AbiP8BLJszLtGzCLjjUbaFyZuCNqj78z3Q== X-Received: by 2002:a05:6000:2cb:: with SMTP id o11mr3237552wry.187.1642174655246; Fri, 14 Jan 2022 07:37:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v13sm6464141wro.90.2022.01.14.07.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 07:37:34 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 1/3] linux-user: Remove unnecessary 'aligned' attribute from TaskState Date: Fri, 14 Jan 2022 15:37:30 +0000 Message-Id: <20220114153732.3767229-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114153732.3767229-1-peter.maydell@linaro.org> References: <20220114153732.3767229-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The linux-user struct TaskState has an 'aligned(16)' attribute. When the struct was first added in commit 851e67a1b46f in 2003, there was a justification in a comment (still present in the source today): /* NOTE: we force a big alignment so that the stack stored after is aligned too */ because the final field in the struct was "uint8_t stack[0];" But that field was removed in commit 48e15fc2d in 2010 which switched us to allocating the stack and the TaskState separately. Because we allocate the structure with g_new0() rather than as a local variable, the attribute made no difference to the alignment of the structure anyway. Remove the unnecessary attribute, and the corresponding comment. Signed-off-by: Peter Maydell --- linux-user/qemu.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 5c713fa8ab2..bd0559759ae 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -96,10 +96,6 @@ struct emulated_sigtable { target_siginfo_t info; }; -/* - * NOTE: we force a big alignment so that the stack stored after is - * aligned too - */ typedef struct TaskState { pid_t ts_tid; /* tid (or pid) of this task */ #ifdef TARGET_ARM @@ -160,7 +156,7 @@ typedef struct TaskState { /* This thread's sigaltstack, if it has one */ struct target_sigaltstack sigaltstack_used; -} __attribute__((aligned(16))) TaskState; +} TaskState; abi_long do_brk(abi_ulong new_brk);