From patchwork Mon Feb 7 08:27:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 540564 Delivered-To: patch@linaro.org Received: by 2002:a5d:59ac:0:0:0:0:0 with SMTP id p12csp4465974wrr; Mon, 7 Feb 2022 01:40:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpI1J0OQ/LUuj5LrjZYPapSJCJHC9l/1S6yIt0TzjkwoMNNCi1eYnOcqFUI1WHXWUPihuA X-Received: by 2002:a05:622a:1189:: with SMTP id m9mr7112685qtk.573.1644226800240; Mon, 07 Feb 2022 01:40:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644226800; cv=none; d=google.com; s=arc-20160816; b=AJ6/vdP6DXtT+OXLIZsgW5CbW4q5NgsIbDL+8B7MR1r2PlPJqgoTsxCax2Vu71+u49 dCOsimqbhzqGohPcJkNZD723ExpkRFB5I7H66oUkyNm/eJjuSclPM8ux276ah77FR9JB o6GqcODtUqlspLq1HT3SNk1L5HnilOh0E83TqV3eyMk7K44Qz9vja9gbMdVCMIxYnmuu Mg/rk3UvEBlk160AokAPbOfMPGO0CsJJ1cosRYG4A6CWIjyzlnE5SD0ErhlKeSZFQ1/C Q7XmDqj1jKQohl9AcSHnYqoeTvfl4eWMty6JzEuPL7wNZ7uIsVRhgs0wjTKkL/YNsKGc ZbYQ== 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; bh=5inV1kYjfaNDfiRW+J3/47EHVe/Moiz0l1xy6G8OEe8=; b=P+irS5FWEj+UpqYX3sE7EmnpsyoRtphQi+yMCsVXDr2cM1bvMky0E6H2FbxBEWzCui exeL5BPyQzgs42dDZWJ94R1a+H2eAokMzITVVHjrT7xNy66bsIvTZiYw/ulKBjbTjrBz 44bP07LXjehooy8WmmLXTSENe4o6Nq/kXrw6ABbK66MhG1p/MJbkHjdzx6nmvOMaWFfO ZWhf4Zk4LCrzRFAa6YK7eUjeMa+KkCMprz3IHWp82Xm9n4NbmeS4JUV0V2PGfGmblRvz B3PC5qN4ivIWPF+UBHp+7LniaP/87qp1D8afcLS+GFoYCppIKVG0suFSle+CkF8B0ugx UKbQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id js7si2345310qvb.207.2022.02.07.01.40.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Feb 2022 01:40:00 -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; 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" Received: from localhost ([::1]:35658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH0V4-0005k9-By for patch@linaro.org; Mon, 07 Feb 2022 04:39:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGzNY-000645-KG for qemu-devel@nongnu.org; Mon, 07 Feb 2022 03:28:08 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:53171) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGzNV-00079B-4C for qemu-devel@nongnu.org; Mon, 07 Feb 2022 03:28:07 -0500 Received: from quad ([82.142.19.58]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N0o3X-1oDLK00jPJ-00wkou; Mon, 07 Feb 2022 09:28:01 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 1/8] linux-user: Remove unnecessary 'aligned' attribute from TaskState Date: Mon, 7 Feb 2022 09:27:52 +0100 Message-Id: <20220207082759.180431-2-laurent@vivier.eu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207082759.180431-1-laurent@vivier.eu> References: <20220207082759.180431-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:JY/PovTIkwSsApTcj3xi4dQnCYGxxgq7387nWZV6ESeBWC9/snp wavuVoYcuHORoNoERvZFSxb0ILEUaTNY5y7kVEwXAttZ+ODGV4iTsFsvqTQGE9pX3TYFbJZ JcrUupZm7c7o8nFQwni4C44wN0wEkTix2BG5ORcJxRkaTghw9ePW32Mh8gbJ/Xr4A35UYn3 hWaU1KQEmvdkPLq9f3Oag== X-UI-Out-Filterresults: notjunk:1;V03:K0:KqoL3oVntYc=:A30PJevTPN1bXAYGzXQpxZ ItSFdWaDCIv2MHk8INXvdO4u5YwInuSe16r8kgUPKCTFr7excPq9MJMdtYCNmnnn60EI62stU EF4Bs0dxgry+g0abYPBu6EbmEgRDPcIfGaoDEmH2Gb8aFq28kWazFNh8k+KBjdxe3XkIEjH7+ BDxXUYGsZEmnbYnT75pLrJc5RrC1P7j+nlWvDOleEP/h9R7lHLlCdENN3bvCFBz3fdhJw9RXo lS0fAZiZsfX4ROtSSKvAMdkAtZCoIE2WDrCdw2TrdbTGCKQyt/b6nDRRoxtlgVyvhh4GyHoxH wmV0B12hfXTYwrmzdQKLQzZ/hCVkYjU95m/gjDaRMw4I/z5NLXvJSDZFEboE3EXC6IccRJ+jd YstNKdlBSwgU8BFUPfb427wMvQhBO/oJ5abpAM93plVCtkQIuYmfCQlXSd253K1mpsZ6Rvfwx pvUlgcmFdmr00ZGPKWo6kIN8v0njHxdiOlTtT/5LWbnAthgeBXgE1chfptQabMCl64u09fibp TMMjJCKfb7+nzL1HcNlgfjH3IecLoW8/mz+GTt24RP1AurCRY4vJQyV5PWSo7W5BPAQRNwFjB YxabPOCRW9Hpc6PHpql/G0eUsGWrm8mlFGbbJVp3mqGBsG1UwCvQ1Ct3KQH/6ULswu5O0HPvF wg7WrxMcXgzZpPpb1LGa6GiuMEaQUtL0N4vY4l26MkS7slVKmXG/mOWY350iy3TEpcb8= Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: Peter Maydell , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell 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 Message-Id: <20220114153732.3767229-2-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- 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 7910ce59cc8c..9d2b3119d1fe 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -94,10 +94,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 @@ -158,7 +154,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);