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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 5EB74C4338F for ; Thu, 5 Aug 2021 17:26:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0EC6A60F42 for ; Thu, 5 Aug 2021 17:26:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0EC6A60F42 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9DE426B006C; Thu, 5 Aug 2021 13:26:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 98D396B0071; Thu, 5 Aug 2021 13:26:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A3E96B0072; Thu, 5 Aug 2021 13:26:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 70AFF6B006C for ; Thu, 5 Aug 2021 13:26:01 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 23EBA18129441 for ; Thu, 5 Aug 2021 17:26:01 +0000 (UTC) X-FDA: 78441704922.21.1E5F956 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf08.hostedemail.com (Postfix) with ESMTP id B7225300272A for ; Thu, 5 Aug 2021 17:26:00 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 1E6AD61104; Thu, 5 Aug 2021 17:25:57 +0000 (UTC) Date: Thu, 5 Aug 2021 18:25:50 +0100 From: Catalin Marinas To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, suzuki.poulose@arm.com, mark.rutland@arm.com, will@kernel.org, maz@kernel.org, james.morse@arm.com, steven.price@arm.com Subject: Re: [RFC V2 05/10] arm64/mm: Add CONFIG_ARM64_PA_BITS_52_[LPA|LPA2] Message-ID: <20210805172550.GG6719@arm.com> References: <1627281445-12445-1-git-send-email-anshuman.khandual@arm.com> <1627281445-12445-6-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1627281445-12445-6-git-send-email-anshuman.khandual@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf08.hostedemail.com: domain of cmarinas@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=cmarinas@kernel.org X-Stat-Signature: c7rmxcaainm9pst6mppxkin8en85hbqa X-Rspamd-Queue-Id: B7225300272A X-Rspamd-Server: rspam01 X-HE-Tag: 1628184360-125290 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: On Mon, Jul 26, 2021 at 12:07:20PM +0530, Anshuman Khandual wrote: > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index b5b13a9..1999ac6 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -934,6 +934,12 @@ config ARM64_VA_BITS > default 48 if ARM64_VA_BITS_48 > default 52 if ARM64_VA_BITS_52 > > +config ARM64_PA_BITS_52_LPA > + bool > + > +config ARM64_PA_BITS_52_LPA2 > + bool > + > choice > prompt "Physical address space size" > default ARM64_PA_BITS_48 > @@ -948,6 +954,7 @@ config ARM64_PA_BITS_52 > bool "52-bit (ARMv8.2)" > depends on ARM64_64K_PAGES > depends on ARM64_PAN || !ARM64_SW_TTBR0_PAN > + select ARM64_PA_BITS_52_LPA if ARM64_64K_PAGES > help > Enable support for a 52-bit physical address space, introduced as > part of the ARMv8.2-LPA extension. Do we actually need to bother with LPA, LPA2 options? We could just add an extra defined(ARM64_64K_PAGES) in places, it may be easier to follow in a few years time when we won't remember what LPA or LPA2 was. I haven't got to the rest of the patches but it may just be simpler to define the shifts separately for 52-bit based on 4K/16K/64K and ignore the LPA/LPA2 distinction altogether (we'll still keep it for CPUID checking though). -- Catalin