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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 00885CA9EC5 for ; Wed, 30 Oct 2019 15:31:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B957A20856 for ; Wed, 30 Oct 2019 15:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbfJ3Pbg (ORCPT ); Wed, 30 Oct 2019 11:31:36 -0400 Received: from foss.arm.com ([217.140.110.172]:36312 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbfJ3Pbg (ORCPT ); Wed, 30 Oct 2019 11:31:36 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7DC341FB; Wed, 30 Oct 2019 08:31:35 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 00FC63F6C4; Wed, 30 Oct 2019 08:31:32 -0700 (PDT) Date: Wed, 30 Oct 2019 15:31:30 +0000 From: Catalin Marinas To: Steven Price Cc: linux-mm@kvack.org, Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Dave Hansen , Ingo Molnar , James Morse , =?iso-8859-1?B?Suly9G1l?= Glisse , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , "Liang, Kan" , Andrew Morton Subject: Re: [PATCH v14 04/22] arm64: mm: Add p?d_leaf() definitions Message-ID: <20191030153130.GB13309@arrakis.emea.arm.com> References: <20191028135910.33253-1-steven.price@arm.com> <20191028135910.33253-5-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191028135910.33253-5-steven.price@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 28, 2019 at 01:58:52PM +0000, Steven Price wrote: > walk_page_range() is going to be allowed to walk page tables other than > those of user space. For this it needs to know when it has reached a > 'leaf' entry in the page tables. This information will be provided by the > p?d_leaf() functions/macros. > > For arm64, we already have p?d_sect() macros which we can reuse for > p?d_leaf(). > > pud_sect() is defined as a dummy function when CONFIG_PGTABLE_LEVELS < 3 > or CONFIG_ARM64_64K_PAGES is defined. However when the kernel is > configured this way then architecturally it isn't allowed to have a > large page at this level, and any code using these page walking macros > is implicitly relying on the page size/number of levels being the same as > the kernel. So it is safe to reuse this for p?d_leaf() as it is an > architectural restriction. > > CC: Catalin Marinas > CC: Will Deacon > Signed-off-by: Steven Price I can see akpm picked these patches already. FWIW: Acked-by: Catalin Marinas