From patchwork Wed Sep 27 14:01:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13400896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA062E80AB1 for ; Wed, 27 Sep 2023 14:04:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 239658D008E; Wed, 27 Sep 2023 10:04:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E7818D008A; Wed, 27 Sep 2023 10:04:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 011FA8D008E; Wed, 27 Sep 2023 10:04:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E02A38D008A for ; Wed, 27 Sep 2023 10:04:36 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B1DAB40CDF for ; Wed, 27 Sep 2023 14:04:36 +0000 (UTC) X-FDA: 81282547752.02.58F169A Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2052.outbound.protection.outlook.com [40.107.15.52]) by imf30.hostedemail.com (Postfix) with ESMTP id 7B3B38001F for ; Wed, 27 Sep 2023 14:04:32 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=akfdtKzC; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=akfdtKzC; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf30.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.15.52 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695823472; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Od0l8mHSmhLv4umuTQwuKNu3i05N7Ly/I3FztsMYFC0=; b=hEP1rP7dMIbHjMB7lkYAlMbdFpom+4ITMfT+zKos2p24OoYs+8rU5G05wYOxkMivdr16b/ +e8O/0fXI2aL/6Kei6hoBbJSg228/wblBEueRE8dR5yt/7KOek9mwTpoe7kw+taeCXYkIM Sjmkvy6nEW6v8AMKSW6p3cD3Cy24bWs= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1695823472; a=rsa-sha256; cv=pass; b=i1uwzdn84AajmfpZVehUcH39onErl/PhVWeABRJTZo2UPKP872YIFTXImA3plOlqPbLuV1 ulzZifii7KM3t76s4bwE3yNCF1S2fLWwJ01fkkxg3NFvDyaNXXQEuJle5LZjz0ctUHmz0d krnBeAiIcdtcuO8R91w62zyyOmQwmV8= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=akfdtKzC; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=akfdtKzC; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf30.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.15.52 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com; dmarc=pass (policy=none) 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=Od0l8mHSmhLv4umuTQwuKNu3i05N7Ly/I3FztsMYFC0=; b=akfdtKzCRWyPyTnfUzlVFcILOoFs/X+BHxOoZO36rgkqEmPBKOl3rU06ptwftgMd2MekPOCX/PrevjniHKaVSZAG0w6sT2wl89mmyyEQAdVDtgeYvwqMyFWVvj3VUd0N9N7iIJxHZnKi/5uoztbxae6m77NvYLJHa/hdnIJlx5I= Received: from AS9P250CA0010.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:532::13) by AM9PR08MB6292.eurprd08.prod.outlook.com (2603:10a6:20b:2d8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 14:04:22 +0000 Received: from AM7EUR03FT022.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:532:cafe::4b) by AS9P250CA0010.outlook.office365.com (2603:10a6:20b:532::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:04:22 +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 AM7EUR03FT022.mail.protection.outlook.com (100.127.140.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:04:21 +0000 Received: ("Tessian outbound ee9c7f88acf7:v211"); Wed, 27 Sep 2023 14:04:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d5b120ad5dc25d2d X-CR-MTA-TID: 64aa7808 Received: from 1113c25b9f7b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 662B7813-5865-44DF-9FBF-61CA59EFE735.1; Wed, 27 Sep 2023 14:01:57 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1113c25b9f7b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Sep 2023 14:01:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PwBz08+uKQozklGnMLpdumFZr9TmwJghIDx5KPf4hXo7Nyg3INiY8jTSbotAJ5sCBtZaaqj9jgDrEz6K5wzTaa7tkr5vw+Nyhj0wLtnRa5/bsnOLCOmC7qYOibkIpusDPgJvBv4J9ANedevZ61URtm1cye1hGIjMtnHJgx+rIGms60I8Emz5kjCzDo8fMVE+50fC6RjTMz5jgveN3CArpdgiQQZFqUQJ7uhO/dkWWYNvRSWlqlfQhfncecOe9R5R2ctGUKS5NyK0LE52j1+IZDl4hRysbgwCBd15VIPzXzhIfz0AzNyswAs0hJCdaKeckIAYT0riZPPErz2A46CUKw== 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=Od0l8mHSmhLv4umuTQwuKNu3i05N7Ly/I3FztsMYFC0=; b=OAE5WIxeYHStQfoi555s3AWdBaSRg+fjFR7Lnt86po+DdknQNQyopbwwHxYCoH8h5aHUip6irDwi2PvsPsV0tPnrHj+ccfrHz3laDkI0X6mKwPmpL+cfbZxsndAyEAtl5aFbOmNbM3eVfjscVWkE8k5isfZHeuYbBN0eKBxuriQuZ16yJhoK0HrIMh939H9CdRChvsgxVFyH6j106+Crm8OCEsiEt7j/0awRcD08+zMScK2GgJZYdC/Evm47vp4CADcxXccIDsSUvU5Z0qvYoT4IjcHRcpMYtIXF36U9nnma2B8uyM29fkhy/70Qs565tSU12BYW+Xfjv9n+z6ixHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.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 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=Od0l8mHSmhLv4umuTQwuKNu3i05N7Ly/I3FztsMYFC0=; b=akfdtKzCRWyPyTnfUzlVFcILOoFs/X+BHxOoZO36rgkqEmPBKOl3rU06ptwftgMd2MekPOCX/PrevjniHKaVSZAG0w6sT2wl89mmyyEQAdVDtgeYvwqMyFWVvj3VUd0N9N7iIJxHZnKi/5uoztbxae6m77NvYLJHa/hdnIJlx5I= Received: from AS9P194CA0010.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::10) by DBAPR08MB5797.eurprd08.prod.outlook.com (2603:10a6:10:1a1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21; Wed, 27 Sep 2023 14:01:54 +0000 Received: from AM7EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46d:cafe::3c) by AS9P194CA0010.outlook.office365.com (2603:10a6:20b:46d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Wed, 27 Sep 2023 14:01:54 +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 AM7EUR03FT013.mail.protection.outlook.com (100.127.140.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:01:54 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.27; Wed, 27 Sep 2023 14:01:41 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Wed, 27 Sep 2023 14:01:40 +0000 From: Joey Gouly To: CC: , , , , , , , , , , , , , Subject: [PATCH v1 15/20] arm64: add POE signal support Date: Wed, 27 Sep 2023 15:01:18 +0100 Message-ID: <20230927140123.5283-16-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230927140123.5283-1-joey.gouly@arm.com> References: <20230927140123.5283-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT013:EE_|DBAPR08MB5797:EE_|AM7EUR03FT022:EE_|AM9PR08MB6292:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a077710-277f-4700-f452-08dbbf62a61b 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: CQdD+2jBTYY2KgNKgi4Az6yHoQoUULetqFrzsQQjO+TmKnj64pXs5WPZrcMdNLtmJ8+60fQsHcn1z5G1JbrOWqVuL6wJZL8Rln8x8p/wGP4fryTcEoKu4BVFAGKI15XS1WlRXcC10TQzjtq+Dv5J1lnwt8iBhCfe5npM+HKhLhME+fZS6IV3z23JJYSHGA8nMevbc606N7z4Ads0D856TBIIQh12WO1RObr8F3ZSJjhfYkeX+fdL6Hoy+4iShbQtTkJBdIZhY2lsBwBqPsdJpm+3mL1A4TpI9nLaPTeL2NjavNLtwcmUMvWWNgp25/rX/0DtYLGKKHx8fcBAzcX2QWivi/+DiUQPFWEjZOr2s+R+hLnjIYTWpjonQiljVYEHMkpjkdbKF3XK7hLIQ/KlZVVKpjW5CYju9+soVUUPIakwAYp6k2keiC0bn9JWRFcsSwK3w/mhnjxerTaTOmf6EgwvYPL/W126YVagWxybSM7U97DkyJhdaXEEidYBeaZ028dYn8Lsx8Gq4hLuEHUl2AA2LTh+WFia8SJU6jsJEJfqLUWD1tg+8TEKi2xQsOaY0CJ7ZDe6UY2U+/K+VkpmrzVeoLSiFpopQ1DOLyCErUoVLODPZ5UGPojQ8ABeh3Yt2vDSgMLugTgyJK0txHv4mflz0LGIisYLEwcCrCXBaTy09R4EEoy+DvGyhIWl1zQPIgKUgsLmoRaCEpE1O+pIb9iXnUogzu5Tw0nUP63qZbkbZtSoL2VzJHl1z9VHpV9x 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)(136003)(376002)(346002)(396003)(39860400002)(230922051799003)(82310400011)(1800799009)(451199024)(186009)(46966006)(36840700001)(86362001)(356005)(81166007)(5660300002)(41300700001)(8676002)(44832011)(8936002)(4326008)(40480700001)(7416002)(82740400003)(2906002)(7696005)(6666004)(478600001)(47076005)(83380400001)(1076003)(2616005)(426003)(336012)(36756003)(26005)(54906003)(316002)(6916009)(70206006)(70586007)(36860700001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5797 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0abdeaf9-fd23-49d2-2eb6-08dbbf624e52 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Zf+1obxaYEtD3PtY1fc9tffwed0HasymHzAB8YFMjD1FGyAPZl9QYVpxQJgSse4JlKK76jBreOEkt3tFXGH47g4Gh2sCpXb3ZPs44ws8ICQ5grbfWwYwSzMQRD+g5Rms7FyF42p+ulN0h3MOALw9gvC9zpD664uyu+m/OG4FjS4QmIeCz84Ex9xedkzOEWFuKRf6YTk08DzurNUlcXMPr/clWkp87OXMj4LvWfIIgminkSwcLE3kam0djibRm82T+o2u/2KG5TU2IaNQcYw6Jw4RCSTWRM8tyB7v0ODivQrnnUly6lExo4pUXkYIYLSqP5ZGS2SbFEqTFI9Yj+vg7jDLVVX1Wpb7U6UYAR24vnc/iZlH6L242vJ28V4QECzFp7v9JUdmiFCiW7v2oISKNc+2ofQXLASp00z4x5ePUHX0Am+2Keet2nSJbdBmOuIKa4XBoYf1iRx6w4EjdlBwpknHD7bBEd7sc2/dCTjEcbpZXb/PGz29j9IyevnKo8Oj2orUO+JiDEQ3OPjVFHYakWnrc0TzJ5EiIHKJPHs7Bq59c6nNEdSNfTYLkI845hmQm/bbmr+wRgMO+rlywlwnvER2M7s/39VqYOoPhlapXf8cgEnLWO1Xdt791zdcQYGy7B3+MlWzXmeiC4Isw9C2hzIJuQDFCOL8MYMq4HqcoaNSZnfOMtJWs/x3zUzAxzgn7P7CKlwUTmIE+5aNkD4ObvPdBZvoEWixuspGtCeFb0kO8Bt1Bh6yd3/MO3xUadb 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)(136003)(346002)(396003)(39860400002)(230922051799003)(1800799009)(186009)(451199024)(82310400011)(40470700004)(36840700001)(46966006)(2906002)(26005)(6666004)(336012)(82740400003)(7696005)(70586007)(1076003)(86362001)(36860700001)(70206006)(47076005)(478600001)(81166007)(316002)(83380400001)(5660300002)(40480700001)(54906003)(4326008)(8676002)(8936002)(107886003)(36756003)(2616005)(426003)(6862004)(40460700003)(41300700001)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 14:04:21.6982 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a077710-277f-4700-f452-08dbbf62a61b 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: AM7EUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6292 X-Stat-Signature: bkut7p87yfit87zcpgibkdfgungkwki5 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 7B3B38001F X-Rspam-User: X-HE-Tag: 1695823472-370395 X-HE-Meta: U2FsdGVkX1+/Zixasl5EtLZzMkwazCsDZjX9DfRtp/+2NGKIiw7RnUnNq4NkOe1GeHLhgqupljp9LCt6goqXFkvklmtP0m9ilCMg2wyGlWV7nHUvQ4QDsoenN56dXzkh695Ft+h6jSpW0thgMeCtrJE+9a2fQdHSPw65aV5RjKrx/GyxQqXx36aOneI93H7fA8sofVMpD9pZotCAqg+nirvnY+HVGQhPecaNRH/AeJfnGqVaiKSi+iPkFtv0xWkAA0uj0Bho0KnXInDyBuJIUoLoIP9XBsmDt0hwO+NSXfrOVStXyF3QAaVIgh07FGZlKegNpWUheCpAlk3T+N+aNfXxhGU5P1/GvbegmFp1AQDNmmVvJPoa3od8DC3Xggqpw7v20XW1bZFdwB3InphLR8YJULs3DDkbgDgELBPevUWPY8EcBuvNbtXOhUdDQezTQMGXHoL46u/9CxVO0lxnmulfyXxBI/0WBOlRj4fRiGdDOBcBxtON2zO2QC4C2aUqizF7b94j41bkweqQJBCQ8CwIE9QRzpEkhqjlDisPSZb2cc2C9sR+nLF4rLzmWqPxfgkbxC7lH7K3ezitXxvFVKmebhIwWpD2rqOngYeoDD5Rny1xcTBW6yShSiHqQCMX51CQolsWbzohF2B9lPWbUssFKRgYAw7DWquGwlRAomO5Qv18ze4qjFXiLn84WsYaza/uYDmm6DjcFbx97RVXPx3Pf1BWeHXDgRYjvUFef6uj8HbJtw3ugTjQDsqzZ3dXZ4+XDKeow9wqi77tE8HdN6r/z1rfWn5MI3KcRwFN0WIPe8LkvYBPw0GW0b0BjLG7rdDyiG3GDtQM2JGMsXYHV/1SRaghvMgdGWqGdqpKo82t2LxMrX8VdssCJJBvo6BYYOp1hSlibFSX6upUZS0RdL9VdEAVtS3NgV0EWOOzYxFubn0/DgHbABNI8f9UXhRD9hVK2mVeBd/bfmH8NEf BNpT8iA6 05bGfe9X+WEdEhdzrbUfkSxd2S7wo6kUBIdP/yYcMMtudo6TjBzyOENauFOC0L8PdSWXwVy4GXMtautfTEuzK3NK2W+RNs0EduL5xKAQ7C6SnZaAf0jR+jlh8q4TOVfGC+CmDL4e1kQX08KP2fAEP+0+zL4jwHMLH8X0FltzXe1WbNCr5F86mlVrECLSH7gb1YCIu1WQBVkOhsyA0T32DYPrYHKvnrgl4SbSVYbEEIh6TE+F9a36F0vKbe51eMfKSl6SOhJdlEWiZR7ub8cmx+5zhBDu3FIA/A58nPBbK54TxyMd7QuefXFgmfsSfe5+Jzixisg0T65Qx4xn9rMg5XyTh6iEu3ewTS/oAXv/GelBGoSs0I8Mngn1XGqG98TaBNWbFvPUHbiFetO8gGXjdHxsBqU8IhlRqhETm7gVa4D0fN89lczRzZKiZ518IRxiCRP26KWo9OqjdUioSJVcQ/ot56C+3qB7RbSHnfbfFUUEAwfksz+/U2cJSh4Iz4ab9Qt1T7SZc/pl8OdiKWDtKwt28rjqtqrp3Fxr3kbp6KJjkMW2/n1UVmSGKtvMZSjECHHr2 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add PKEY support to signals, by saving and restoring POR_EL0 from the stackframe. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/uapi/asm/sigcontext.h | 7 ++++ arch/arm64/kernel/signal.c | 51 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h index f23c1dc3f002..cef85eeaf541 100644 --- a/arch/arm64/include/uapi/asm/sigcontext.h +++ b/arch/arm64/include/uapi/asm/sigcontext.h @@ -98,6 +98,13 @@ struct esr_context { __u64 esr; }; +#define POE_MAGIC 0x504f4530 + +struct poe_context { + struct _aarch64_ctx head; + __u64 por_el0; +}; + /* * extra_context: describes extra space in the signal frame for * additional structures that don't fit in sigcontext.__reserved[]. diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 0e8beb3349ea..3517271ae0dc 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -62,6 +62,7 @@ struct rt_sigframe_user_layout { unsigned long zt_offset; unsigned long extra_offset; unsigned long end_offset; + unsigned long poe_offset; }; #define BASE_SIGFRAME_SIZE round_up(sizeof(struct rt_sigframe), 16) @@ -182,6 +183,8 @@ struct user_ctxs { u32 za_size; struct zt_context __user *zt; u32 zt_size; + struct poe_context __user *poe; + u32 poe_size; }; static int preserve_fpsimd_context(struct fpsimd_context __user *ctx) @@ -227,6 +230,20 @@ static int restore_fpsimd_context(struct user_ctxs *user) return err ? -EFAULT : 0; } +static int restore_poe_context(struct user_ctxs *user) +{ + u64 por_el0; + int err = 0; + + if (user->poe_size != sizeof(*user->poe)) + return -EINVAL; + + __get_user_error(por_el0, &(user->poe->por_el0), err); + if (!err) + write_sysreg_s(por_el0, SYS_POR_EL0); + + return err; +} #ifdef CONFIG_ARM64_SVE @@ -590,6 +607,7 @@ static int parse_user_sigframe(struct user_ctxs *user, user->tpidr2 = NULL; user->za = NULL; user->zt = NULL; + user->poe = NULL; if (!IS_ALIGNED((unsigned long)base, 16)) goto invalid; @@ -640,6 +658,17 @@ static int parse_user_sigframe(struct user_ctxs *user, /* ignore */ break; + case POE_MAGIC: + if (!cpus_have_final_cap(ARM64_HAS_S1POE)) + goto invalid; + + if (user->poe) + goto invalid; + + user->poe = (struct poe_context __user *)head; + user->poe_size = size; + break; + case SVE_MAGIC: if (!system_supports_sve() && !system_supports_sme()) goto invalid; @@ -812,6 +841,9 @@ static int restore_sigframe(struct pt_regs *regs, if (err == 0 && system_supports_sme2() && user.zt) err = restore_zt_context(&user); + if (err == 0 && cpus_have_final_cap(ARM64_HAS_S1POE) && user.poe) + err = restore_poe_context(&user); + return err; } @@ -928,6 +960,13 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user, } } + if (cpus_have_const_cap(ARM64_HAS_S1POE)) { + err = sigframe_alloc(user, &user->poe_offset, + sizeof(struct poe_context)); + if (err) + return err; + } + return sigframe_alloc_end(user); } @@ -968,6 +1007,15 @@ static int setup_sigframe(struct rt_sigframe_user_layout *user, __put_user_error(current->thread.fault_code, &esr_ctx->esr, err); } + if (cpus_have_final_cap(ARM64_HAS_S1POE) && err == 0 && user->poe_offset) { + struct poe_context __user *poe_ctx = + apply_user_offset(user, user->poe_offset); + + __put_user_error(POE_MAGIC, &poe_ctx->head.magic, err); + __put_user_error(sizeof(*poe_ctx), &poe_ctx->head.size, err); + __put_user_error(read_sysreg_s(SYS_POR_EL0), &poe_ctx->por_el0, err); + } + /* Scalable Vector Extension state (including streaming), if present */ if ((system_supports_sve() || system_supports_sme()) && err == 0 && user->sve_offset) { @@ -1119,6 +1167,9 @@ static void setup_return(struct pt_regs *regs, struct k_sigaction *ka, sme_smstop(); } + if (cpus_have_final_cap(ARM64_HAS_S1POE)) + write_sysreg_s(POR_EL0_INIT, SYS_POR_EL0); + if (ka->sa.sa_flags & SA_RESTORER) sigtramp = ka->sa.sa_restorer; else