From patchwork Wed Jan 3 01:28:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Do Nascimento X-Patchwork-Id: 1881826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=k5sZ8bhu; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=k5sZ8bhu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4XGv2vDWz23d9 for ; Wed, 3 Jan 2024 12:30:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 60D23385DC31 for ; Wed, 3 Jan 2024 01:30:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2040.outbound.protection.outlook.com [40.107.8.40]) by sourceware.org (Postfix) with ESMTPS id 87E1B3861022 for ; Wed, 3 Jan 2024 01:28:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87E1B3861022 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87E1B3861022 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.40 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1704245332; cv=pass; b=OM+jYei1wMckwTu5Ue7w4ErkeE3fGsZHr8HjoOvr+Gz3MKVGokWMWFweYPE7X4hgMC2CkpQ9kaMpaZSnPCA/fwAFAE/TMmJ8h40QT8T1nNhaEs4PJQfysZalr3XXVf4IafWOfsCZo01U5R/VDjccNCq8I0vGsTT1BYwxDsES6+8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1704245332; c=relaxed/simple; bh=U83PuogFYvswOwvwMo/bpCKko1qq/dcLFMbbXQBYSvs=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=kW9KSaLmtp6yjGo2mOh40lkezVWzsz79n44Xvdl9xTXFRBOOuCtAX+XbpbxtjrOjd6cH5ksARW4RmuRucgoF7wM891ZS96TcytgQoa8lZIyQZQBMyKffHi037rCmVUeCYKbFrxMyYsujDX3u7YUvQoS+rf9OXv17IQRepJCVLTQ= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Etj4CrajHwPGZpcKezwgoBkBahL2qPUbon4O8FWqwqnzM6wzY+Px/DxQEcX33eXQDG6bPeDBLIp6OqsjHUiAjgEF+klgLNV+Tt3l/PMG9m+tjMowkx6iVlckazDFilC7uH69UGE3RZJ9yxh48H13hlDboVienH0u8gYcdIRiYCerAq0NzWhKemLU6GdKQEU5ji5scFu1cLXSthMAo7YLzW4Z6MVkq+R5eT137rQqwNrHhzGxi+N7hbiL35PIFf8o6CVfrF4R7d7Na3qiOxy5sYUzvDtRC07G470JsUSH2j3w2Lm1geKPOJw9zwspIMWxMaHz6H1DSDN2MF8XWgzloA== 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=6b4H76p4GPiDqkU/J5p5ry1813JtjHU59aXya6+0m1U=; b=aGLtDhPPLFvTENMWpHXFuLdlBOaNgRKxIVnNZ4NNUl6lOaZcBmUhuyGhrlCPO29q0hXTzgMwY6FkbWI3ethqP5NyDAHu8UhYogsacsJxCJmQMd293KAajruF6x61WXI7omkJ6hT+WYYed213LQSSvfVxJQayALkivtHWgekWr/fX8KlGCpTKfzJaz3obKChzWBlVgBtNeviomkTWib9/Wt3xNaM89boiZ7QKzsZTNvJ1DPum9uINal9PkE0qnIpeWuS4cObOogfKy6cljJYYxe3SrcTuGlcWQnLbu4g/nynjoroyUXZ+V6HSEPUXlivCCTsjDjgTWp/cUoJrwfwgtw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.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] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6b4H76p4GPiDqkU/J5p5ry1813JtjHU59aXya6+0m1U=; b=k5sZ8bhuuKOjg8XV9Dsruthzw25tguZX3qLLM8S49iYW4kVDEwHMbvGgxLHv0vz3hhAncfBgFdlRNNF41Hjx6tqySfTYILmZkzDqm8A/n4mOBHhzRYkZQNJTa4fX7NiRtHQl8B/p51ISM+njZvIXphv8CCv7CcNe0dV8N8EltxE= Received: from AS9PR06CA0535.eurprd06.prod.outlook.com (2603:10a6:20b:49d::33) by DB9PR08MB9948.eurprd08.prod.outlook.com (2603:10a6:10:3d0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24; Wed, 3 Jan 2024 01:28:47 +0000 Received: from AM1PEPF000252DB.eurprd07.prod.outlook.com (2603:10a6:20b:49d:cafe::85) by AS9PR06CA0535.outlook.office365.com (2603:10a6:20b:49d::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25 via Frontend Transport; Wed, 3 Jan 2024 01:28:47 +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 AM1PEPF000252DB.mail.protection.outlook.com (10.167.16.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 01:28:47 +0000 Received: ("Tessian outbound 385ad2f98d71:v228"); Wed, 03 Jan 2024 01:28:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c02573c8a45e1593 X-CR-MTA-TID: 64aa7808 Received: from 963da53f32f7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E07E3B70-E6B1-4F3D-9675-F65297E7F91B.1; Wed, 03 Jan 2024 01:28:40 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 963da53f32f7.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 03 Jan 2024 01:28:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l4eULQiYAmI7a16ETlMpJWkQ7OCX5PD9Cc9TfrW6OQs+wkl+AoPt7y6v+UKcINH6uBVEOAmjegyah8GYboHolQPF5xaYX4n1nDhJByhqZsI4h/+yBBEX8pAbdVL8C7ENvuVpUjeUwmrtRyjYNe3HDlpv0YbodVRSIDbo36RD5suW3I/dHuL1CW3/Fd+ZrOeoIZXqcFOXUTzLTdZxAN8G+T0bSIV7+CQLJeUFYHuMMActP5m+u5M5VzirFZuQ62JH2DKg2IjNJQYLRi2spg5oAxunEy/f2917O1ryzSzbgA8wpffk3xtomFtCzvGlJ17go1m/NjvTTOchIMoXBgqE2g== 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=6b4H76p4GPiDqkU/J5p5ry1813JtjHU59aXya6+0m1U=; b=lUsw5uV+0ezMaGd/OXKXR93wQiMS5NP2Z0TVqrk4+Vw1FyNfWb3XvGN1s75FuM7zydpTpGgi3pgox1F3DH10IimwWobLtML1qooVeMecrlWbJI4Nh3VTQ90DzqJT6zTbghTP4Rl/o7EWeNy6EGRokId4ySjeDbuD3hX45WZNIc0OQO4GgtuxdIXRzE73ivOtt14KRTbrl+F0rBtnNN48x2H5REvKxkxmx1L2Wl2eakvE/w9kgma1pIRUXFs1mk81SU1b4HQ++Cs/2FiozcvfUgrMPJ5Hz315q/ul81c/EMxVYBFNA8TRYOVlZgBzIrn/SvXOvOw9C2AuornzldSm8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6b4H76p4GPiDqkU/J5p5ry1813JtjHU59aXya6+0m1U=; b=k5sZ8bhuuKOjg8XV9Dsruthzw25tguZX3qLLM8S49iYW4kVDEwHMbvGgxLHv0vz3hhAncfBgFdlRNNF41Hjx6tqySfTYILmZkzDqm8A/n4mOBHhzRYkZQNJTa4fX7NiRtHQl8B/p51ISM+njZvIXphv8CCv7CcNe0dV8N8EltxE= Received: from DB8PR04CA0013.eurprd04.prod.outlook.com (2603:10a6:10:110::23) by AM0PR08MB5363.eurprd08.prod.outlook.com (2603:10a6:208:188::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 01:28:36 +0000 Received: from DU6PEPF00009527.eurprd02.prod.outlook.com (2603:10a6:10:110:cafe::5e) by DB8PR04CA0013.outlook.office365.com (2603:10a6:10:110::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25 via Frontend Transport; Wed, 3 Jan 2024 01:28:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DU6PEPF00009527.mail.protection.outlook.com (10.167.8.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 01:28:36 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 3 Jan 2024 01:28:32 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 3 Jan 2024 01:28:31 +0000 Received: from e125768.cambridge.arm.com (10.2.78.50) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Wed, 3 Jan 2024 01:28:31 +0000 From: Victor Do Nascimento To: CC: , , , Victor Do Nascimento Subject: [PATCH v3 3/3] aarch64: Add explicit checks for implicit LSE/LSE2 requirements. Date: Wed, 3 Jan 2024 01:28:20 +0000 Message-ID: <20240103012828.2446443-4-victor.donascimento@arm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240103012828.2446443-1-victor.donascimento@arm.com> References: <20240103012828.2446443-1-victor.donascimento@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU6PEPF00009527:EE_|AM0PR08MB5363:EE_|AM1PEPF000252DB:EE_|DB9PR08MB9948:EE_ X-MS-Office365-Filtering-Correlation-Id: bd7e24a7-b231-474f-cdd0-08dc0bfb550e 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: UxC5n2MjEswyXGSYyOj0KOL4pmiXuEc9QhaULXM2zyPBEwRSX4et0BeLsd9JwUYO0eAnRxnsTV3vpXR2W6N3q2ebv3ybYWYpHa2SmISelXnmnKXaSo2Wjy9qsbAX6pcOicza7gQIpYb+CnfJ2i6Y7+pD9DjSbk7O8rrtEdAaQgwsFk4mFRot+fCa7FNE3KNEJcNYksz+4HPPpAql5sKDTdWDlcxcs40lc6C9K1Z1hCIef5xdOWuIR0jPOM1G37JQri6aVMFs3ZrmgNHCaEpZoo9MTGKGObYAmLh07JHE0vT8QR45qw8wj0Zia8kUEP+A7e0+D3je1kBStVKjKDF+/1O0Xrz1/fe/uW60X15eaImVjLmiqH60lD0B0rat1S0EtZLnuREbeRuqh1byvnSbicJEtofm47F9QlgsVpCXNZlgW22ch45LvhKH7og9Z5Alhu3xqjPlspduy8IcJTxNtiXuu4xHzLXnWyNIf0amqQtV1TMKM1CUBkdlCNoyF0es+YS1okCBr7nflMGB6F6c99DtnesJnfDClZqiLQfFHlX8elWQLD5ysau5YbltaiJmMkGjrMUD00oyVDBoWAT09wfS5I96SwjP2C4cqu49fyMLdELrNJx9yud7roSzIOUqgU534F/THw/wO2QTCrW/uMoLXeXdFXSCQHFccFwNXTP5fvJflcU/voEZ1aaPUdAxijA/ObACX9aN15A13EyhpbG/8ABSdlJ5lEc1DaCimCZwdQ9idPi+nV58cIGXbPaQdA+DlTApIKuz/oMjpNSDDg== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(39860400002)(396003)(136003)(346002)(230922051799003)(186009)(64100799003)(1800799012)(451199024)(82310400011)(36840700001)(46966006)(40470700004)(36756003)(40480700001)(40460700003)(70206006)(7696005)(86362001)(70586007)(336012)(426003)(82740400003)(81166007)(356005)(83380400001)(2616005)(26005)(1076003)(47076005)(2906002)(4326008)(5660300002)(478600001)(6916009)(6666004)(36860700001)(41300700001)(54906003)(8936002)(316002)(8676002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5363 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM1PEPF000252DB.eurprd07.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8d78867e-eb24-4fe0-9501-08dc0bfb4e8b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DraeDznK2FP1YvP9fc53oWgRLutfsFweZ1Z4NawWbD/4YsoyvWhW3CcqG3J8zk5tEtTBrBBctOewsWKyjmEgO9NL6/xWNEn3Z6xsuqdJsbpGeQsGE4nVytRvZHUQRhbJnI/xVf/EE/qF1TDijw9MnPbklrw/W+Jle4uHz8406LoEElCq/TV54ZCEpSjIpaWE5Xo2Q5iqygxSjxHwtYZVdBGpsxFcs8oyB538rHqecoZ3Yy/EIsbrKIA6/NCunBTInKGzFyv0wyxSvpPDIaMbhYGQF/0et1jbXsBrOQLxE9Cttv3G2KKdObt9qCO/yo/Cx/51YRpSGuIy8wnT4GRc423US2FVKSioqS8toWo3opRbWXUR9jiHt8HocwGa9jh0LybBiMRE9+snAjmdlcKaOzr6u/AP2PzPZGmXQo0Vex1CrNsd1cAZAoOo7UMowsiT5yOIr0STJTd/63EuOlt9Vaqmw2FGNfyEE7mgENs439/Qm7ySA55q9Ezv+tAlkfvS0IEdRb/d0K5YQc36MrVOIVj++pKTeHJcJYXfrARfFTWtmuJoIDk+N2efh1Dj68Fmz3sjRYLU0/tEIcdHhWc7BgAJz4R1ZHhHUPfTk+sg0imOaldSCcDg8ulXliPZeAI0zW+UVE+XH54yyT7cuDgnkrjevY7WRwgSMER2ci2Na3nPTPpm6oOnHwl64wsl+iMw0FkbOeoLUUHd5F9z0AdY7QrnRhnG+/eccxXs7/s8oMq3o4VMgJSOYWjUZNyloQ1P 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:(13230031)(4636009)(376002)(396003)(136003)(346002)(39860400002)(230922051799003)(64100799003)(451199024)(186009)(82310400011)(1800799012)(36840700001)(46966006)(40470700004)(6666004)(2616005)(336012)(83380400001)(26005)(1076003)(426003)(7696005)(54906003)(36860700001)(2906002)(47076005)(5660300002)(41300700001)(478600001)(70206006)(6916009)(8676002)(8936002)(70586007)(316002)(4326008)(86362001)(81166007)(36756003)(82740400003)(40480700001)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 01:28:47.1029 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd7e24a7-b231-474f-cdd0-08dc0bfb550e 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: AM1PEPF000252DB.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9948 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org At present, Evaluation of both `has_lse2(hwcap)' and `has_lse128(hwcap)' may require issuing an `mrs' instruction to query a system register. This instruction, when issued from user-space results in a trap by the kernel which then returns the value read in by the system register. Given the undesirable nature of the computational expense associated with the context switch, it is important to implement mechanisms to, wherever possible, forgo the operation. In light of this, given how other architectural requirements serving as prerequisites have long been assigned HWCAP bits by the kernel, we can inexpensively query for their availability before attempting to read any system registers. Where one of these early tests fail, we can assert that the main feature of interest (be it LSE2 or LSE128) cannot be present, allowing us to return from the function early and skip the unnecessary expensive kernel-mediated access to system registers. libatomic/ChangeLog: * config/linux/aarch64/host-config.h (has_lse2): Add test for LSE. (has_lse128): Add test for LSE2. --- libatomic/config/linux/aarch64/host-config.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libatomic/config/linux/aarch64/host-config.h b/libatomic/config/linux/aarch64/host-config.h index c5485d63855..3be4db6e5f8 100644 --- a/libatomic/config/linux/aarch64/host-config.h +++ b/libatomic/config/linux/aarch64/host-config.h @@ -53,8 +53,13 @@ static inline bool has_lse2 (unsigned long hwcap) { + /* Check for LSE2. */ if (hwcap & HWCAP_USCAT) return true; + /* No point checking further for atomic 128-bit load/store if LSE + prerequisite not met. */ + if (!(hwcap & HWCAP_ATOMICS)) + return false; if (!(hwcap & HWCAP_CPUID)) return false; @@ -76,12 +81,14 @@ has_lse2 (unsigned long hwcap) static inline bool has_lse128 (unsigned long hwcap) { - if (!(hwcap & HWCAP_CPUID)) - return false; + /* In the absence of HWCAP_CPUID, we are unable to check for LSE128, return. + If feature check available, check LSE2 prerequisite before proceeding. */ + if (!(hwcap & HWCAP_CPUID) || !(hwcap & HWCAP_USCAT)) + return false; unsigned long isar0; asm volatile ("mrs %0, ID_AA64ISAR0_EL1" : "=r" (isar0)); if (AT_FEAT_FIELD (isar0) >= 3) - return true; + return true; return false; }