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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 13E32C433E0 for ; Wed, 10 Mar 2021 17:17:20 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 9B5B464FC8 for ; Wed, 10 Mar 2021 17:17:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B5B464FC8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=I+6w19H83jqUVY0zdOwfjeC4sNtK3qraUo9ZrggCyFo=; b=JhecssjumlhtYzAlMqJPI2hy9 9CAnBtS+N1aNNClcYMP2B5KFTIzk+YKGAOU1wZYch4woiU4Zd5EG7C+j+3BDfwB0nTWnP44qDGSp0 jRwVh/pXw3F+vLrOWrHsLHS9H8UNfQtlWlTL10pTUNz19fASeHnS6Qsazg5qIrHeZpPTRuwIEhMh7 IvuiySGxVjgZ4f91f+xuoeiNxcjxY8XXpEuGABIbJo/t6mBHn8sxq9n20haSU9NY/CkfJnKP5TD/E ikEcXGAcs7WH8zzhKH7oxkxyCO9h3ry6G6MHmgm2EPpjuv+3UkSqYWO0OtDJ9HGzhUwXQpRflC13I cR/1HOfhw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lK2RI-007JDk-HN; Wed, 10 Mar 2021 17:16:04 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lK2Qq-007J6d-DS for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 17:15:38 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2EBFD64FC9; Wed, 10 Mar 2021 17:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615396535; bh=O+ivB0sScz+G0YrjowJzRQr/3iFB9kqkWm7ulkislfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvSDn8SGuGODv44N76Z35uKeBVUKX6bOPrYbXgK85pnbrBuYjxM+qHANFtpTJs6Gy fbnPiNylyf26uuuDNgA6rTYrEoFINUHtvYXGCb6ax59+uWuTgGg09T2BsSkEGozLs+ GrfsKkvYTor56e7u36JPxdHawBcHQIJqMJwslKfkDaF893cewmOXu1F+SIiREjB4qY WYRQgfQJGL9oIyHTGOPhbelpW0TixPOIUmOdt8ayVargcgKAGd4XrwkRhIUYZoGd0m ea3/j7tB8+d+XhI9sfE19mwm/vQW8q8tF+v51lPbz2g6JPzxORI6ovleQ/dReqO+ly FOMcfWt/0ALgQ== From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , Mark Salter , Will Deacon , James Morse , Catalin Marinas , Mark Rutland , Steve Capper , Anshuman Khandual Subject: [PATCH 5/5] arm64: mm: switch to 52-bit ID map on 52-bit VA capable systems Date: Wed, 10 Mar 2021 18:15:15 +0100 Message-Id: <20210310171515.416643-6-ardb@kernel.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210310171515.416643-1-ardb@kernel.org> References: <20210310171515.416643-1-ardb@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210310_171537_209981_6103CA7B X-CRM114-Status: GOOD ( 12.47 ) 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 Now that we cleaned up the code a bit, add back the code path to use a 52-bit VA ID map on hardware that is 52-bit VA capable. This removes a TCR update from the cpuidle path. At the same time, make the 52-bit VA handling mutually exclusive with the extended ID map code: a 52-bit VA kernel running on 48-bit VA only hardware never has a need for it. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/head.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index da6e99fa4e08..06f1ddeef821 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -303,8 +303,10 @@ SYM_FUNC_START_LOCAL(__create_page_tables) str x5, [x6] dmb sy dc ivac, x6 // Invalidate potentially stale cache line -#endif + mov x5, TCR_T0SZ(VA_BITS) + b.eq 1f // skip VA range extension on !LVA hardware +#else /* * VA_BITS may be too small to allow for an ID mapping to be created * that covers system RAM if that is located sufficiently high in the @@ -321,6 +323,7 @@ SYM_FUNC_START_LOCAL(__create_page_tables) clz x5, x5 cmp x5, TCR_T0SZ(VA_BITS_MIN) // default T0SZ small enough? b.ge 1f // .. then skip VA range extension +#endif adr_l x6, idmap_t0sz str x5, [x6] -- 2.30.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel