From patchwork Fri Sep 9 12:43:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12971720 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B3B19ECAAA1 for ; Fri, 9 Sep 2022 12:44:51 +0000 (UTC) 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:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=049qosE+c90/rwUPbs3bm0/YYcpT7RIlQASoOXIdhpY=; b=Rvr70gHVMy8CUG sP9hDGq7nWhNDMMd57/LBzw5n2di8nkWnTCYkptiklumSX2eT1hmi1Ly2qy+5BRShAzKzuIxGlxfo sWVXCaCKV1vNN8vyJ2KX6eJWGjK5y2bnl46IpZgHv5JYFNXX9Z23npIm8BjitDkeSi73Il5YWb3b+ 4pqWKrInH0oeNvFyhry6BQa2d9c/C8Vrrj6q6Zuq2KqXHjyNihBr5M7ubCXu2MyEKW7xLBJrmo3Y2 E/0e/slHTmgKnw/Nv6Oab2HJraJN8h8JUC7ImgYa8ZvX9TaSK+itAX3Gt/F+i/8pI+iKUUg1ywh/6 xzbk7OMPLE0k/FvclaWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWdM5-00G6SR-RP; Fri, 09 Sep 2022 12:43:34 +0000 Received: from mail-db8eur05on2060.outbound.protection.outlook.com ([40.107.20.60] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWdM2-00G6Qg-D9 for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 12:43:32 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=dNNaN4zXVCwqSDph8hkcjk/h+7pWM/FTBrMx83NnAgNo7kpes5dV6RymXz9qtjtk2jm/PcWpKQVLfgaQ36hJC3uRUxrN87dUUUGAtjSBrTknpJSfuJpuo7nm2vHuSDv3Pckf96nmPWkR4rmEMl1bqAGcSc/DX/5xuTv8mXxhaackmHgYYZng6RYGZ6nN3n4stExn5ouqazk2g5qk3mc7LsYErpniN4sA8LkVdMrIkwoXyvHqfv7F7k0tUYz5VfKW8EkigOtPiFnejskbN7sCK1Nf88lb1Y86TkufE3yyatLJNA7UBJilsyKEegqZAVK5+TD/oF4tQsXk1Bjm6cHNrg== 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=ULTrbK7oH5V6cSGbx4h9jyV4qyFYSo73IeeTKcMTLQw=; b=JKsxzEY9km4RRgS6vFsPN6IENqnFmS97cT88+iYRYV0kgQXJZOfrIk4CcedY2mZZGFrcJ81ysPPiL8spzoGw8bHUddGZdefsALmbGvfvrN9XCdQJdp+Psq+wZLtbFWr4D/uMaY8nM15rabXJrB9vMX3xdLMg2IUAuv5sRgxWADi90Si4u6MaVaZF8jKEfhXNiQy/5bcqQfi4ikfKIcUSXVdKyVRuXA/ez2XIOAqY0Uzcmu7TqV341Sb1BaHo+bNLPixqClfcEoXjABfRlecp1kT1X065J9ECbV+JN6alT09h1y9RMzZ6PRt/VehPsMznX8/js/YQu3tXPwaHLfylGg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.infradead.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=ULTrbK7oH5V6cSGbx4h9jyV4qyFYSo73IeeTKcMTLQw=; b=zji/hZLmEy7zJJumN13aWVCsLVxJMYLwRMz7SzzwKIc5Kr7s6z5n4YKuIGY8s0xCHB+1KetzLf5rOUG96O8h9kU9UyTmC1lQeojHkADQdllQRPG0GZ4clOheAUTtW5eQcGrI8r1pdXXgAkNQFZ6CJVpWJsuq5SM8fhx6H+ieqMQ= Received: from FR3P281CA0022.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::10) by AS8PR08MB8136.eurprd08.prod.outlook.com (2603:10a6:20b:561::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Fri, 9 Sep 2022 12:43:26 +0000 Received: from VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:d10:1c:cafe::e5) by FR3P281CA0022.outlook.office365.com (2603:10a6:d10:1c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.6 via Frontend Transport; Fri, 9 Sep 2022 12:43:26 +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 VE1EUR03FT050.mail.protection.outlook.com (10.152.19.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.13 via Frontend Transport; Fri, 9 Sep 2022 12:43:26 +0000 Received: ("Tessian outbound c883b5ba7b70:v123"); Fri, 09 Sep 2022 12:43:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ee784329bcd7da9a X-CR-MTA-TID: 64aa7808 Received: from 8010f4729d98.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 51375FC4-E73B-41CD-A7AF-37EBECF5AC62.1; Fri, 09 Sep 2022 12:43:18 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8010f4729d98.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Sep 2022 12:43:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DQXR0xAzF+7TEDzLVHYGpTAL241fTgK2qclifBQoeX83468Ty+6Ohp+rYVIqVO0S0T/j3r4SHTIJkwQfldCalYWzC3GQ2UtLKvl5Bhtow9w9R4/VxG76Ny9dRKL7Ha2isleHZ4Rrlfa/bNQkp9jElGK5BP+fqFSHFqlZ3sctgpQ9Cpif3KJQ2hI73Ch53xLjb8i4vdkWhONjP8NJOxGLZlL8gtHjnfNEmGpjdMjTSKiYjP2VimwuP1uEkbZwlDupNjzjyIrC4mEXAl2IZ9nkQNraJ1c9L7299OSLKgtFTnpOiBp+irYwE+SxpfaLtPm4mfH0vpkarO/uQ0bGgdijwQ== 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=ULTrbK7oH5V6cSGbx4h9jyV4qyFYSo73IeeTKcMTLQw=; b=Idp6YawoKhYjc19H18ju9vwGnRXgRu/EqOqK5f6nFsAgd5hslTwi1wk5Xk5glqViA6rtbXhP/+bQe6R3EzZyt89m9PFyPaQdONpTPEHAHJQTwt+H0WUpuiirrpR2tvTJMceSslEnV3sOCiFKcVvuLaZFEg6lidS6rKjFZMaKFhHW37cxz2KZ6i4cc8yCt5Z6T4xPc6VdLSvW0CRb1hPu3ykYf73RxzPk6VxfHB+3J5PZdOLNRYueEnHlSPI49BaAHlnkUjOpYimwsFZREqfwMGWij659c4HDeyyiKP8DW8EHbUQs2FBT0yIU4O4TQJSqQGoT7/m2w0KwzWwj1qG9rg== 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=ULTrbK7oH5V6cSGbx4h9jyV4qyFYSo73IeeTKcMTLQw=; b=zji/hZLmEy7zJJumN13aWVCsLVxJMYLwRMz7SzzwKIc5Kr7s6z5n4YKuIGY8s0xCHB+1KetzLf5rOUG96O8h9kU9UyTmC1lQeojHkADQdllQRPG0GZ4clOheAUTtW5eQcGrI8r1pdXXgAkNQFZ6CJVpWJsuq5SM8fhx6H+ieqMQ= Received: from DB6PR0402CA0012.eurprd04.prod.outlook.com (2603:10a6:4:91::22) by GV1PR08MB7345.eurprd08.prod.outlook.com (2603:10a6:150:20::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Fri, 9 Sep 2022 12:43:13 +0000 Received: from DBAEUR03FT029.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:91:cafe::98) by DB6PR0402CA0012.outlook.office365.com (2603:10a6:4:91::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.19 via Frontend Transport; Fri, 9 Sep 2022 12:43:13 +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 DBAEUR03FT029.mail.protection.outlook.com (100.127.142.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5612.13 via Frontend Transport; Fri, 9 Sep 2022 12:43:13 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Fri, 9 Sep 2022 12:43:12 +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.9 via Frontend Transport; Fri, 9 Sep 2022 12:43:12 +0000 From: Joey Gouly To: CC: , , , , Subject: [PATCH v2] arm64: mm: fix resume for 52-bit enabled builds Date: Fri, 9 Sep 2022 13:43:11 +0100 Message-ID: <20220909124311.38489-1-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT029:EE_|GV1PR08MB7345:EE_|VE1EUR03FT050:EE_|AS8PR08MB8136:EE_ X-MS-Office365-Filtering-Correlation-Id: d573acca-af4e-4031-b7c8-08da9260e3c7 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: p9wP7Sxl1HgT1UFftLxSj4+tMFWP7Q8mnom0ZnI2B0QMITuTFmgw46g3CCTbfk3hCNRypE6qOEOOFfaplIZ2q22s9wdb+mjnllQpPOwntUm93uMpCaxLq22Kcm4WlkIK8ph19ZCq1StX2gjGiH/8ekpAG/oA0pl+GLTRvRH5WAh5lpEB0FNHqWnIG4WL+eiPcLF7f6+3g2lsv1mX9Wb6lFycHNYq0OP8fOYhpjRqaMlAOZo2pBP57ECs81+cUja+VxGF5Mq0Lg7cVKp9xAPcYYg6zIxz3gYfxOzt1+AVoqp08RTgA0fQDg+hxS1UisCmRBfrItH730edZCpGhincXdbdKeLDdo7mCPiCamrUdN6CmREDlwqq5VkA02QY4+Rya7gLOuowYQsbYmnLrJCG8641s5meoB9fLskpag0lk5ySqCTRyHbCD/5smFMuHG2b+T/PmbLWrPeHT7iQrZNvNrOsL4Hq6IWowBxu+wtHnHClnwTi18QkillsqedNrHqcTY5i3LGp2LP1gIslaSxdSzlo7+tksWcNpFgbeB20noOeWgA5yDxz+xDAfxTsvaoHJ+7vc9rgBI5s1S5FDO7zX1Riazi1+Zx7fgn70bMdxyv9xL+7U5EP11KU/jE+BAMDz9zD8B4L0wmA8hmu2UgQxoBtM+F5eJanzuEzJWnsOynZzd31IbuKhPS4z0MuBcVOtP/T8/L1QSfE85xYRILYstGMcQ9zL5LPugKOea1GV5Oc4upMz6Y1jCebFFfsFkCKR7TNvsZdTlJnw0whpxYcHA11oTLZzz0fz9S76R+vL0dLdOydhgXuuHrYskkvcZil 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:(13230016)(4636009)(136003)(346002)(376002)(39860400002)(396003)(36840700001)(46966006)(40470700004)(1076003)(356005)(336012)(86362001)(47076005)(426003)(83380400001)(2616005)(186003)(40460700003)(36860700001)(81166007)(82740400003)(8936002)(82310400005)(44832011)(478600001)(5660300002)(70206006)(4326008)(36756003)(8676002)(70586007)(2906002)(40480700001)(7696005)(41300700001)(26005)(54906003)(316002)(6916009)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7345 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8e4f469b-f747-4562-9a5f-08da9260dc29 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z4MIpIT0JUPlwqI3R+uRKG79z92ic03Hx3mFd68YqmE3JACDTKGrUXa3yZAEvlntC3Wu7jyiU72pX+ai4TuVjyJ57C2LsvOKjxxL7rC9elxkNWyVZqe4T/x+MHlWlcyvWFITbWMS3HSTz77J20m5wDQhQ9ycYj7/9HuoUGqPM8TfFtMsXvhjh0Y7jXecRbj4xRECC55s4sepyl0dUP2FapfEwgjOHnECCpS/tZ7SzxkkaINw5FmHlwSQV3sdPHqnqX6vUnVwOOKlmDo2EYfkAmfG9N9EZUbnwRwYYs1JkZh4KNCNEmKJPhufdPBY+Nq6KPK8ocLLJKoznnP6T6nnH6UuQKZjCHHbu9EFn6H8lwLcD3wKcuJa7KeVRbUPXjOmvQ6poxZg6WUYBK7iwGQNmUx5YpkhxGwER42MUMCaexuoFQaknSiyTX3lmBFq9FuidQm/utqyAipdfnocw9JVgmE7G+ivPHjjpCiWWkFg+IsMpjMgOregY/fTQ74xW4Jma9i/s8tKrzhfkYkJoVpV/CW8sVO4mODkeOuqkOELGHC7pLJrvWi5PkAqNWscp0nRqm82O1755RfN9gBJThNL/ggwWi0bSmXkNcEEmgeCSYGV7zntETbXCzCgcUKhTh/jFcu1eoWhygcGYMTCiVCKo9pg8V2lViQCoercAim7d4rj+6DFqyTpE9MF2ocO2TWX0WFZXWp7IAAdrsvGzT62MRaGtteaf4Q2bwqH1EyTrorv1bEVweLai4Cy5Z2ULvyunKLTobc8OAVEpPBUU4tMDw== 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)(136003)(346002)(396003)(376002)(39860400002)(36840700001)(40470700004)(46966006)(478600001)(8676002)(44832011)(70206006)(41300700001)(4326008)(70586007)(8936002)(107886003)(5660300002)(81166007)(40480700001)(2906002)(7696005)(26005)(82740400003)(40460700003)(2616005)(316002)(186003)(86362001)(336012)(82310400005)(54906003)(83380400001)(47076005)(1076003)(6916009)(426003)(36860700001)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2022 12:43:26.1285 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d573acca-af4e-4031-b7c8-08da9260e3c7 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: VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8136 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_054330_476650_51C8F166 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org __cpu_setup() was changed to take the actual number of VA bits in x0, however the resume path was not updated at the same time. Load `vabits_actual` in the resume path, to ensure that the correct number of VA bits is used. This fixes booting v6.0-rc kernels on my Juno. Signed-off-by: Joey Gouly Fixes: 0aaa68532e9d ("arm64: mm: fix booting with 52-bit address space") Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Acked-by: Ard Biesheuvel --- arch/arm64/kernel/sleep.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/sleep.S b/arch/arm64/kernel/sleep.S index 617f78ad43a1..97c9de57725d 100644 --- a/arch/arm64/kernel/sleep.S +++ b/arch/arm64/kernel/sleep.S @@ -101,6 +101,9 @@ SYM_FUNC_END(__cpu_suspend_enter) SYM_CODE_START(cpu_resume) bl init_kernel_el bl finalise_el2 +#if VA_BITS > 48 + ldr_l x0, vabits_actual +#endif bl __cpu_setup /* enable the MMU early - so we can access sleep_save_stash by va */ adrp x1, swapper_pg_dir