From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60063.outbound.protection.outlook.com [40.107.6.63]) by sourceware.org (Postfix) with ESMTPS id B26B13858287 for ; Mon, 8 Aug 2022 07:38:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B26B13858287 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=OgJPK/491xoJ13e51dfpdWm7XCS+xM3ADjD6QhFApQKnxG7xPFUiRq6x++7nJwB1vY0ADlmLc4VlxZCu2br6Re4Tz3ERdcIhapPJl1HF7XUAVsSN9YhscjIbfHyCVw9hz+ZaS+WHoVxrQ06lmE/Vi4JweLFk0eAlp9bg/poflMWO4zQgRL5VXMdlskUAem41WVCE6gwEv/UVsK9DUa4UOVkhbWvxOqsfLwptiDXQgGBrmZoyl6Kw+bAkcvux2AEpG03UbUpPiPH7lHLEv7s20DraYGxIKQJrPt/zDiuLEsSj2GFsmxbwQqfVfwl28nBkGQQJX/u6xoWNRvJkmiKjYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SBO1ogPFPsTPFkNC8U10w2ZQVAgIOtmDCidSViTKZI8=; b=fhvu06v0VotBqwSIbBPGDczo2TPpQiqSDVUyaNuwo2xbhck+8E6u0GihoXbissgrKT5/IWrlKMwWjqm5RD2Qck6McXSqTLliwKVFUVVQPba+qjzu2g/MLK9bBJEfBM5rRV2WRS827xLScLgv+sXf3hrNLcdxQ4mnvqtaDzPhkpHE/nb4f9uVRU5GEKWXfSnR76nyTzZlPgHQREmEFtf6VphxGPGI0Z5rG60ameL6vcY1LCW55q3h42gTqnrjqQW3ogCzSrGXXFWqHgcw1MRlgT5vtNXbZWzO5cjAVFdcILI9/Y8yIk4REOwGerDngM2RWCntqB76pAZHAO/0C4j8BA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) Received: from AS9PR06CA0539.eurprd06.prod.outlook.com (2603:10a6:20b:49d::28) by AM9PR08MB7070.eurprd08.prod.outlook.com (2603:10a6:20b:414::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Mon, 8 Aug 2022 07:38:43 +0000 Received: from AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49d:cafe::bd) by AS9PR06CA0539.outlook.office365.com (2603:10a6:20b:49d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14 via Frontend Transport; Mon, 8 Aug 2022 07:38:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT009.mail.protection.outlook.com (10.152.16.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16 via Frontend Transport; Mon, 8 Aug 2022 07:38:43 +0000 Received: ("Tessian outbound 2af316122c7a:v123"); Mon, 08 Aug 2022 07:38:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2676e26b4dbaec3f X-CR-MTA-TID: 64aa7808 Received: from b3604ce0ac36.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EBC6917C-1755-4D90-90BF-66496F513E4D.1; Mon, 08 Aug 2022 07:38:36 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b3604ce0ac36.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 08 Aug 2022 07:38:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g3I155i3yrYCzuLFJ7KtcT1R7uxVok70936uJ7do2Qly15KF5wpqSF5wHhLUpF/GswQ3qbaR+qY+W3wMZWN7Cmx9VboIu4IhRAIDBIw9LBwIQuxjOBM0TIpg0yVvY0q9ekRO5s32WYcPOtS8ccRxG2HkJStoCLtcC8piDDEcv7yTrc4P90UJWDmU62a0lMapn/YiOUyhjV352IpZmmgPJPwLLeClt5zfTAkHTiHvxpGcL6ncR3r6sp/0Pe57ObCKFi4KMemKY3qvxUuc6EKMbDMhJjCE/7GHlDE5StXJrPL48THDR/U6hK/bKzkJUL5x8cfF6N+M0kUw6qcKW4aXEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SBO1ogPFPsTPFkNC8U10w2ZQVAgIOtmDCidSViTKZI8=; b=SmzPnIxVHM2cE92NkI2y7ACNczaTI6zQXSFmNcz4eeKyBfMYzrU80OUn33anIMKBSD7kzS3BAWjul6Y9rkBrFVy5obPI4ohjN9KkliXYpgE/h3u20F+0zB5w925rLhgnRmvK36I58APLIm/2zrQxp0r7xP3j2GYXlpriCip/XfH5QAm9zarETeGAI2kZGaJZtnQLyIk1sO8K2yzKqecS3HUEqZt6QYFUrvwI7QGm/y0+vtRWlWvqiztJn45Fsu1D4wBJ96nFZfxuQP6+m/1BgcnA7LhhbMtD/D3HrZJyp6NXBMw722G+OhiU0dQea03jwM+7UfXSiYjOAxYW6WgcHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by PAXPR08MB6752.eurprd08.prod.outlook.com (2603:10a6:102:131::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Mon, 8 Aug 2022 07:38:33 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::cc64:9170:b12d:de8]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::cc64:9170:b12d:de8%4]) with mapi id 15.20.5504.019; Mon, 8 Aug 2022 07:38:32 +0000 Message-ID: <55d81a59-59d2-3b79-1b4e-918e795bd561@arm.com> Date: Mon, 8 Aug 2022 08:38:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH,obv] [AArch64] Remove unused struct Content-Language: en-US To: Enze Li , gdb-patches@sourceware.org References: <20220805154800.48136-1-luis.machado@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA9PR11CA0018.namprd11.prod.outlook.com (2603:10b6:806:6e::23) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 1e6c18c4-c900-4558-9166-08da7911052c X-MS-TrafficTypeDiagnostic: PAXPR08MB6752:EE_|AM5EUR03FT009:EE_|AM9PR08MB7070:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bIPj1+XGDnPq8ykuEwixPh84cCgI5XK6SEK5l2PW1r0OSQKOd94zlbgdegWGqb2M6hDva7BEdhbIcek9P/Q8cA2VvV0L3XrEvexkIq29IrEF7WIn7uOtbYcm3oXBf1ZLJZYErrndby49D7xKQEbbDX8Zq5cehbGYV5WPk+8KViE+oBlaTsSFM3KeLccDwUE20ndxhQt1S71O2I0Pkf3fdmwG65sxPXIQT99hlDWa0b9V0q6MRZz/ttzsWirNLcBU5g21sZqoURwVk+53mhHh7XG6v5Ju1X6DFsy8/WVHdY0TE+1mHSMP4adVDiDr+MmQ7OWEZs81bYySX8S9lbUcDs+O7G5qKDws0W4NKNr9g33qiorphlwHg7MMs7Yq8u3OhKwAvVAWO4NPR77NNQF/VAELpqHVqb+swRgJ04/aF5HGxfTWABvjs87SHObxY7shgXgvZDYuwGG4PNBepcrFTlsckWKl4HZW3Lirvg1+qXPdGcEwyS8baEe0Gpn3+U5c/f1MycRJvWopEvQ1SJYqMVEN9Movj2cCTWjnwWnt16bvMnediRbRkP6THx4C2nAU+iekwyaTL+7VSBtS7fPwuiOYAvNVENSNJxqq1U5zH3aLBEwSweMq6NLbCHBEFUmvHAo6tlkZc2xaDkwUmItLXKCN3h94bELjaMNqF8wZQkZaKMSldqPKPgTKG+T9+RZASuqqsCwVKhqvaR6T0t/bPuL5JSDx+6ofPSGuZQXdRY4xwIysyaU1a5dWFb++bHBsUZRfsJdHRq1dAi+KkTqTG+BJdoIPhisrSl+/bpujujyq2aGl4BbPKROXwYkalAaetohAq8AAW52cY67JChze6g== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(136003)(396003)(376002)(346002)(39860400002)(36756003)(6506007)(26005)(6512007)(6666004)(38100700002)(41300700001)(31696002)(86362001)(6486002)(478600001)(83380400001)(53546011)(2616005)(186003)(2906002)(8676002)(66946007)(31686004)(66556008)(66476007)(44832011)(8936002)(5660300002)(316002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6752 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2e15faa2-877b-4ffc-26a4-08da7910fe23 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +PAA3ZqFtlZ7z935GjWPL0YOc06MXOI3PiKbyLBdQtbTsra8DvScrtubCtSLlc022NKfJZQAnV2A+KJP42wvqGzbperqKPQBrlPapARB51YK+NFJBSlM/N/w1ps0bc4PFEQieJ7b/I3VFF8ZUVdl3GGaCWt+u2/XleMcHUMRa9SQJxQz1kwZMfiD5bhBfidLG2E4+X/pZpjkCyuxw8ucEE+JU5u4tKJbq8YIa1SNcEnu3Y77sAi1Gy/CAI7ilPcOt8HvLzMeOhFMm7AHCVnE/o76yPBEo/qO66lebQSDrhRpLncVWG+lO6yDa0HM2QPDhAqUvD/dQBmHNHXI53AvDARIBp45f7AEJw0rJpfi8013xiq3C7YXZaf99KfV7qOm5lr3YqnXvwLDhZ3wg0X2yQ5G0G5ZKVn0ohjuGkeIAvl3GjONAK3LIZ5/iCfqQ5Yi2deaEL87l5eRxEVcmxBsrOk04wLjJZUtgMZYaUbxFHlC4JpIHCvFYQLUJOqYhJkiK2f9P3Db1gPhPx239l62utaMLxjKuSOROPXK1ZVE83VEc2YN5bTahbY6Omhc64Qxs9rCXjxKnvXIOd3iBqwolz6CjCzrZd7Thl6JawvcMxanR6ZJbTbjT8I7/pEBaDu4DNvMJrad8kYkWM2dn4fhL2ko6+R8S4EBz1SH15hu2PW1LJ2kEuWU0Bcp9+QmKXcgje/ZcfWnEzGBqZniXuqQI9XV6ktBVUdwwJz4FmniHY+Sr4ZRgfGn13qsG3v3s1b0s1XCK1Tyoj1bmqkTSUJEgb490wQxqvSDpohVXPqxsF0NX61jVU8fcumHSu2jJuI1foMOk9Y7L2pq1UKBLyifHA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(376002)(396003)(346002)(46966006)(40470700004)(36840700001)(6666004)(2906002)(81166007)(356005)(53546011)(6512007)(26005)(41300700001)(6506007)(83380400001)(40480700001)(36860700001)(47076005)(82740400003)(2616005)(82310400005)(336012)(186003)(40460700003)(6486002)(478600001)(70586007)(36756003)(70206006)(8676002)(8936002)(31686004)(86362001)(44832011)(316002)(5660300002)(31696002)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2022 07:38:43.3999 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e6c18c4-c900-4558-9166-08da7911052c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB7070 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2022 07:38:48 -0000 Hi, On 8/6/22 08:39, Enze Li wrote: > On Fri, 2022-08-05 at 16:48 +0100, Luis Machado via Gdb-patches wrote: >> While doing something else, I noticed struct sve_context is not used >> anywhere. >> >> Remove it then. >> --- >>  gdb/nat/aarch64-sve-linux-sigcontext.h | 6 ------ >>  1 file changed, 6 deletions(-) >> >> diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h >> b/gdb/nat/aarch64-sve-linux-sigcontext.h >> index 1b40ffa8ee9..a166fbda7da 100644 >> --- a/gdb/nat/aarch64-sve-linux-sigcontext.h >> +++ b/gdb/nat/aarch64-sve-linux-sigcontext.h >> @@ -21,12 +21,6 @@ >> >>  #define SVE_MAGIC      0x53564501 >> >> -struct sve_context { >> -       struct _aarch64_ctx head; >> -       __u16 vl; >> -       __u16 __reserved[3]; >> -}; >> - >>  /* >>   * The SVE architecture leaves space for future expansion of the >>   * vector length beyond its initial architectural limit of 2048 bits > > Hi Luis, > > With this patch applied, I use the following command to check, > > $ grep -rn --exclude='ChangeLog*' 'sve_context' . > > ./gdb/nat/aarch64-sve-linux-sigcontext.h:48: * sve_context.head.size >= > ./gdb/nat/aarch64-sve-linux-sigcontext.h:49: > * SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)) > ./gdb/nat/aarch64-sve-linux-sigcontext.h:52: * If sve_context.head.size > < > ./gdb/nat/aarch64-sve-linux-sigcontext.h:53: > * SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)), > ./gdb/nat/aarch64-sve-linux-sigcontext.h:59: * will need to remove or > resize the sve_context block if it wants to > ./gdb/nat/aarch64-sve-linux-sigcontext.h:65: * sve_context.vl must > equal the thread's current vector length when > ./gdb/nat/aarch64-sve-linux-sigcontext.h:74: * guaranteed for a struct > sve_context written by the kernel. > ./gdb/nat/aarch64-sve-linux-sigcontext.h:79: * the start of struct > sve_context, and SVE_SIG_x_SIZE(args) is the > ./gdb/nat/aarch64-sve-linux-sigcontext.h:102: > ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) > ^^^^^^^^^^^ > I noticed that struct sve_context is used here, which is eventually > used by SVE_SIG_CONTEXT_SIZE. Although SVE_SIG_CONTEXT_SIZE is not > currently in use, it could cause a lot of unnecessary trouble once > someone uses it. Indeed. That should be cleaned up as well. I failed to catch this on a build check. Thanks for spotting it! > > Other than that, there are still some comments that refer to struct > sve_context, please see above. Maybe it's overkill, it would be nice > if you could deal with it. No, that makes sense. The documentation can refer to the struct, but it should probably point out at the source of the information, which is the Linux Kernel documentation. > > Thanks, > Enze >