From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BA02C4338F for ; Tue, 3 Aug 2021 12:12:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C775160F35 for ; Tue, 3 Aug 2021 12:12:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C775160F35 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bzx6CCs25ZO23nXCT9/25EEFtDldLbQqncVUNz1Sj7g=; b=ZgcLgQqadFi97U qCFJIP1O1VhYOCIFtHtxdr8eL3IKdhX2EwLe+eLr7zdC4wtCuoFiazLk1fZYhAsDkTfVLhb7u//lb UBcCE9KkByhb4uHIPTZUsIJC8Ky8de+sk6MZKUQHeThv8rukJUR9+YV+yjEWhpwBUZC9ZS8gutgbj r7zXcscZPcRDBrQncbEQfaGBPHpMMd9sEXgEardax6CFXZWKq96wdRkwzJ6j2Yd8OMUPsOdy9M9cn zOTgp4lDueSlbPTWxqLKAfxQ7SdOCkJg7FQJWdv7JrMob5DIP4jVDJSxV33GPa2E85COzcod6tlVG yU8k27OfYtVDyA0AQP4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAtFP-002XGp-4Q; Tue, 03 Aug 2021 12:10:20 +0000 Received: from mail-eopbgr50058.outbound.protection.outlook.com ([40.107.5.58] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAtBx-002Vqz-3A for linux-arm-kernel@lists.infradead.org; Tue, 03 Aug 2021 12:06:43 +0000 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=oICRL/bVtqUOxTVte2NyvW2A7OXDARIIKB2M8sm4ios=; b=0OYv4Tsv+UzJmna8PIAESyE/ZvlGPhdTLnTHCui4lnVdbcx4AirKXVuiVmxxoQ3m41rFh1du+/2QsX0u4dKkWstVjQy1UxXJ4LGaD5YWIosNmeSn7oFw87g9wCzEzBsYYxj5CZBksFBL3WMGIh3wFvi8UzME7DK0yafMtJ02slc= Received: from DB8PR06CA0014.eurprd06.prod.outlook.com (2603:10a6:10:100::27) by DB7PR08MB3514.eurprd08.prod.outlook.com (2603:10a6:10:49::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Tue, 3 Aug 2021 12:06:36 +0000 Received: from DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:100:cafe::ca) by DB8PR06CA0014.outlook.office365.com (2603:10a6:10:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Tue, 3 Aug 2021 12:06:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.infradead.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.infradead.org; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT017.mail.protection.outlook.com (10.152.20.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Tue, 3 Aug 2021 12:06:36 +0000 Received: ("Tessian outbound 8529ae990a93:v101"); Tue, 03 Aug 2021 12:06:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d848aaf2c82670c3 X-CR-MTA-TID: 64aa7808 Received: from dcebc1096285.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C319D55B-F8A1-4E3A-B972-AD28608B3FB1.1; Tue, 03 Aug 2021 12:06:24 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id dcebc1096285.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 03 Aug 2021 12:06:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kfhbG7+sIidGhqkmMA7AHVrHgwgRyn471HtR7qLs9vhFoW9rWmrV3qTTOnb51C3l4Hb3cSTA2Ohjp9/yWe+3F8O9PgyeYQjqJQfpOPP9gVlJ5sqYQewBzXyMZSU+7AkjGtaS/TvVOlgRRyixHKefdeYnqIqA3USCCmuVFENov5gm0bQ4HFEE5SKY5KxiwCyI9oU2RoQbkr20Da+UcH+HMdzbSujyW0wCBKqla8SLeMlENqpNLur5oked7ufd8IsnwJBtGC+zWG41LOCkU13XOqKCAEpzMdl2zN2UQw5PjqJsSCt0qxBSP/i4Yrn1NEw95LisJp+OBbuQSFn2ar2W2Q== 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-SenderADCheck; bh=oICRL/bVtqUOxTVte2NyvW2A7OXDARIIKB2M8sm4ios=; b=X/u2Tpn2KuiR1u+BPK6ruAPIHXE8Q5Yj34Nu6cLQYBH+DU3zZQhfOMEawNqfZuGJpE1A8igoIa/9yjt0YUu2Y1J+hzV3wV3tkNmd0qawqv/i9UL8U99wSZjvWnhclBQbM7Dv15SqArh4TRy6QJW+RtJcV3FV27sR6WGmfEYm4JkG10bEnF1zq1/0GAU//p3XYE9ZYOVaPXjq1p0x27BxYQjYF+8wElvn+CL9MYHnX9Mobh393c/iqGDDjwiAAja8dmezn8W7zFpYb7ZWnMa8BMHZp8+3qS0OsAJphsgPyBMAIVv5zEM7UpzzHNQxX5n218n4UVZtz0EnGJzx4HEQog== 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 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=oICRL/bVtqUOxTVte2NyvW2A7OXDARIIKB2M8sm4ios=; b=0OYv4Tsv+UzJmna8PIAESyE/ZvlGPhdTLnTHCui4lnVdbcx4AirKXVuiVmxxoQ3m41rFh1du+/2QsX0u4dKkWstVjQy1UxXJ4LGaD5YWIosNmeSn7oFw87g9wCzEzBsYYxj5CZBksFBL3WMGIh3wFvi8UzME7DK0yafMtJ02slc= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from DB8PR08MB5433.eurprd08.prod.outlook.com (2603:10a6:10:118::13) by DB6PR0801MB1688.eurprd08.prod.outlook.com (2603:10a6:4:3a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.25; Tue, 3 Aug 2021 12:06:12 +0000 Received: from DB8PR08MB5433.eurprd08.prod.outlook.com ([fe80::193c:9c05:ddf2:db0c]) by DB8PR08MB5433.eurprd08.prod.outlook.com ([fe80::193c:9c05:ddf2:db0c%3]) with mapi id 15.20.4394.015; Tue, 3 Aug 2021 12:06:12 +0000 Date: Tue, 3 Aug 2021 13:06:10 +0100 From: Joey Gouly To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, james.morse@arm.com, maz@kernel.org, will@kernel.org, nd@arm.com Subject: Re: [PATCH 3/4] arm64: entry: move bulk of ret_to_user to C Message-ID: <20210803120610.GB52119@e124191.cambridge.arm.com> References: <20210802140733.52716-1-mark.rutland@arm.com> <20210802140733.52716-4-mark.rutland@arm.com> Content-Disposition: inline In-Reply-To: <20210802140733.52716-4-mark.rutland@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0069.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::33) To DB8PR08MB5433.eurprd08.prod.outlook.com (2603:10a6:10:118::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from e124191.cambridge.arm.com (217.140.106.54) by LO2P265CA0069.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Tue, 3 Aug 2021 12:06:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87bfc5b3-8752-4f8c-f576-08d956772467 X-MS-TrafficTypeDiagnostic: DB6PR0801MB1688:|DB7PR08MB3514: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: NMoei4vjqtZz3Fh+M6aKJBaIa6UJvnGoGgBAaFGLhdeBjV+q6PHG1/FxiAvGSfJrFXAsm3OSHvsoirED5510/2i/PFX7QT1rQwaYqI6EzcwSgGY2ftwVDeCIG770qJIH+c5zxzegkedoOBKOOkqK1QwUDApH55loGKLfftaXffSYPfDBly2i1NNvjEM/X6HwZFka6qnBVlRFrSUHZ93CuR8V4Hbig6oxutVvBkFjSJsvDmnbsKf5vUC2r5ThYqZHLcMDFcdXdNPY47+KIwrCdbC6eqJVvzwcEQOGjEkXTDEYZ7n16iA3Bvd9BonRUq+r4+NK1b2r1GIHv/Z0Au3CiOzL/APzNuNBA1UIOEuyDIASEtTh0Qvr5BKA7Y5Gf85ajj5r4clqZyZ+7DD0v7YvtGN1/jzR47m/ILEkLj3SLD4huKkFtTIc1gbtAnjkTtvyhOxd4GAcrdrRYUuMTferkBQA3cuV2VmlraDuLw2NjaXsGRdhGLehET/KNvX4Sq8S/neaZADwfbR5h8whNugRj5dqZavm0+YAe+kD00Z2goCvSGtgJCql48+hiwaNDEir3X6xRDeShvDYWO6hYwSttu3TDVwJ2hPMGTEAuiN79oIAyINS+PfafpFkqZjPyLumauNg34iB/VRh+w+y0jbPtTrmoATiYgddK+deQ76JlCNdc+dP4OTBsdUYkmvbQDsBCONj9T8fuXLUPLDK21Pm1g== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR08MB5433.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(366004)(39850400004)(346002)(396003)(5660300002)(33656002)(6862004)(1076003)(44832011)(478600001)(316002)(26005)(86362001)(38350700002)(2906002)(66476007)(186003)(66946007)(66556008)(55016002)(8676002)(4326008)(7696005)(956004)(83380400001)(8936002)(52116002)(38100700002)(6636002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vAco/0EwiuqDSdlGKAg25bNVAPh0qOSieVKHkLb+SCkM9D4c1nUzvhbFXl8S?= =?us-ascii?Q?j2j+z5q1gPsTf77/HM3K1nu52C6f58nfyca3J17cRSmx4bdzyixaxs+DAsSd?= =?us-ascii?Q?ZvM/7A+WbuuaSMTel0sLhASpgZ3W5IMrIWrC1jyHjclERCBi4gBmFys+D9Xl?= =?us-ascii?Q?A5ZD6IrhQesM40GYfDKL0AeAPeoV6r7nZ+3b0ECRehGUTZ6ZIhmO999oErrS?= =?us-ascii?Q?z96/kLkGBf2ZVLsZjdRliM16W8iNJgWCpr8hOdH+TQHUqK0/HAvPdhn7BzUX?= =?us-ascii?Q?AJFFLSYWCAdKIaw0G6KfkZ5jtRc6yGe/DlvyUrcjxebEn3ZSWUB+An6765Cn?= =?us-ascii?Q?43oxE6too+QKbtLhz6AgGSUPZFKlJ6zdJ0mjBD5XWjs9QZEIz47mVeR3A7OF?= =?us-ascii?Q?Zox1VTtH7lWYw6ABqv9x2p/v9fI7rYx1F+QaqApjyfMH9Bx0j/RrYGjiFUVS?= =?us-ascii?Q?SDDfavzrEMqwCK82VRGoeRCHHl1vdE0kKU2tCP9rb9Lb2nkRSDQAxFYaifIi?= =?us-ascii?Q?Gd7x44QPV1Yj0Ck2vkwtKlBgeq+85rOrY9guIyHqF2/OU+CvNTumrAuMBQqE?= =?us-ascii?Q?23M6xMgv2Pkh/417c1yr5InNHmF5Z8iiKVtss7QGFq432Nm+UBfZG0qa+6h/?= =?us-ascii?Q?aWVaNbAyFbq2r73DnAWCRhTSsvMGmPWRt/iAiEZzQD3epWuiie8iSSTyJHg1?= =?us-ascii?Q?rWkuHvOTgXqC8PHW1dXVfGXf3ZFhCp2QvcxfkWPHdj4FouxQaeoVPbntTnjH?= =?us-ascii?Q?ub3Txgnb/cvqoD2ufAu4d27KdXuTEFw8X2vlLqYiwdOqFat0a/XbBHWMFdxw?= =?us-ascii?Q?Mt1xMCWD3UGM0LnLoEc8F9L88WfRRE2spOyTTifLGqQRwaZPk6vZgYK7u+SA?= =?us-ascii?Q?RmRlcWZubrnoKOGz74CHIBqmAWPmbZsKDRgLPIW3F3nCZig/ROk6jQQ1CkEI?= =?us-ascii?Q?wId4zB39u2HNspE3mDaPF7LUhOvdgeeiZ9BFsF3PD5GnKxFfMoTLrSu2T5fy?= =?us-ascii?Q?7/I+V5V3Lk1R2r3OEEgQpuYGza9Z7kixo160gs9V/Cmw4xHOvXwdcxcDgvR0?= =?us-ascii?Q?X1yipsCs0/awQbgwba31GSpzeggKwWMXAwI3HDuFaQLEKfsDctEuusLVUfJR?= =?us-ascii?Q?Nx6ownY6mz5XmjL1ZHvkytfHcKGVhOawTwux0ocadweKG6Tz46aycZpn3Zd1?= =?us-ascii?Q?f9Ki/u1D8VT8lnu9kqFi7A/yhzit3ywhnckSpUIW+jBjW6OtuWlmkbA+Q+jv?= =?us-ascii?Q?wYtazv0YIUCSgG7Uw1sXzlBbNuMsKgdLP5zLKe4lrwVa1M8CHCydROr0T41h?= =?us-ascii?Q?ku5L8r4OzEtD80sn5bweaQpw?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1688 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: b11bd38c-a716-4e0c-fe7d-08d956771659 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 31l0Q2fdsAgomepZ5zlcyuGkNk5idFDfz1lpQd2C06AFaClJHKvVgFj0JF+rkxvfFfBMnW9MexH91MnuNJ57v7HM4B7wZFx6z09SScMA+WdfaoW+fR+006EjpHGSELSuQxUqNK7JaP2FkCpoPF0Lsm/UXwSlzQMG4wwtd/dZB9+UYQIwbxFKoYZFGgb04bWQlb+TKpqaGZwZvIbHg+rsM4BuGjKrxKm8hG6uyeTGMuUGC5UIJC2fu9bt5MPi1XgAV326d3BOiNRIGUgzPAPeMj8fIkDzoYXUc3a4qF4Ngf4W/Oco0sEMPdK7DqlXI6KVA1HReaNG+mEX0Dqka5k8oCuYDkEskkHdX2TemrMVNZhXKZEg38IG3Tv2pNx0WbUwlO0Zgu5S2qKRPD6V30F5i886Y75AGIQCNfN9nfvVn0hffW2f8CQea5mphPDlyYX4gBZ83HBeaI/i5Dg6kz1lwPZ0qciBJ60m7B/6EQLx5iLQYf7jHCS2za0HCuXZbEkgljWAEksoM9X2KaKD+b5QPNBjmUmCr1KftjaGRI+7TLY10fBiUReaFygdkI4I8+hBtRoVNH13mlqhUDkn+JiUkJY8uY1ia0NrJjs8xwAUBgqFwimjn7OwupZB83XKlWSq9I8n18Ymcsw7vBjZKxpVboSoP9k13GQimhkz/oN2MrDa2UUTWD8yKnW2xscD4579Y+WWaxtVIRXGJ2aeC28V0Q== 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:(4636009)(36840700001)(46966006)(47076005)(83380400001)(44832011)(70206006)(70586007)(33656002)(186003)(81166007)(55016002)(36860700001)(336012)(86362001)(5660300002)(356005)(956004)(1076003)(8676002)(8936002)(7696005)(508600001)(82310400003)(6636002)(4326008)(316002)(2906002)(26005)(6862004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2021 12:06:36.1455 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87bfc5b3-8752-4f8c-f576-08d956772467 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: DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3514 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210803_050641_213718_041F15A6 X-CRM114-Status: GOOD ( 18.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 02, 2021 at 03:07:32PM +0100, Mark Rutland wrote: > In `ret_to_user` we perform some conditional work depending on the > thread flags, then perform some IRQ/context tracking which is intended > to balance with the IRQ/context tracking performed in the entry C code. > > For simplicity and consistency, it would be preferable to move this all > to C. As a step towards that, this patch moves the conditional work and > IRQ/context tracking into a C helper function. To aid bisectability, > this is called from the `ret_to_user` assembly, and a subsequent patch > will move the call to C code. > [..] > diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S > index 863d44f73028..fe0a9bcc3e1f 100644 > --- a/arch/arm64/kernel/entry.S > +++ b/arch/arm64/kernel/entry.S > @@ -29,16 +29,6 @@ > #include > #include > > -/* > - * Context tracking and irqflag tracing need to instrument transitions between > - * user and kernel mode. > - */ > - .macro user_enter_irqoff > -#if defined(CONFIG_CONTEXT_TRACKING) || defined(CONFIG_TRACE_IRQFLAGS) > - bl exit_to_user_mode > -#endif > - .endm > - > .macro clear_gp_regs > .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 > mov x\n, xzr > @@ -585,37 +575,17 @@ SYM_CODE_START_LOCAL(ret_to_kernel) > kernel_exit 1 > SYM_CODE_END(ret_to_kernel) > > -/* > - * "slow" syscall return path. > - */ > SYM_CODE_START_LOCAL(ret_to_user) > - disable_daif > - gic_prio_kentry_setup tmp=x3 The `gic_prio_kentry_setup` macro is now unused too! > -#ifdef CONFIG_TRACE_IRQFLAGS > - bl trace_hardirqs_off > -#endif > - ldr x19, [tsk, #TSK_TI_FLAGS] > - and x2, x19, #_TIF_WORK_MASK > - cbnz x2, work_pending > -finish_ret_to_user: > - user_enter_irqoff > + mov x0, sp > + bl asm_exit_to_user_mode > /* Ignore asynchronous tag check faults in the uaccess routines */ > clear_mte_async_tcf > + ldr x19, [tsk, #TSK_TI_FLAGS] // re-check for single-step > enable_step_tsk x19, x2 > #ifdef CONFIG_GCC_PLUGIN_STACKLEAK > bl stackleak_erase > #endif > kernel_exit 0 > - > -/* > - * Ok, we need to do extra processing, enter the slow path. > - */ > -work_pending: > - mov x0, sp // 'regs' > - mov x1, x19 > - bl do_notify_resume > - ldr x19, [tsk, #TSK_TI_FLAGS] // re-check for single-step > - b finish_ret_to_user > SYM_CODE_END(ret_to_user) > > .popsection // .entry.text Reviewed-by: Joey Gouly _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel