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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 3E9B1ECE58D for ; Wed, 9 Oct 2019 10:55:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E320F20B7C for ; Wed, 9 Oct 2019 10:55:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E320F20B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 66A448E0005; Wed, 9 Oct 2019 06:55:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61AC78E0003; Wed, 9 Oct 2019 06:55:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53A7F8E0005; Wed, 9 Oct 2019 06:55:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 345668E0003 for ; Wed, 9 Oct 2019 06:55:50 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id DB3DD181AC9B4 for ; Wed, 9 Oct 2019 10:55:49 +0000 (UTC) X-FDA: 76023940818.12.shape44_4fe42a651fc02 X-HE-Tag: shape44_4fe42a651fc02 X-Filterd-Recvd-Size: 3551 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Oct 2019 10:55:48 +0000 (UTC) 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 8A51628; Wed, 9 Oct 2019 03:55:47 -0700 (PDT) Received: from [10.1.196.133] (unknown [10.1.196.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9F3443F703; Wed, 9 Oct 2019 03:55:44 -0700 (PDT) Subject: Re: [PATCH v11 07/22] riscv: mm: Add p?d_leaf() definitions To: Paul Walmsley , alex@ghiti.fr Cc: Mark Rutland , Peter Zijlstra , Catalin Marinas , Dave Hansen , linux-mm@kvack.org, Albert Ou , "H. Peter Anvin" , linux-riscv@lists.infradead.org, Will Deacon , "Liang, Kan" , x86@kernel.org, Ingo Molnar , Palmer Dabbelt , Arnd Bergmann , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Andrew Morton References: <20191007153822.16518-1-steven.price@arm.com> <20191007153822.16518-8-steven.price@arm.com> From: Steven Price Message-ID: Date: Wed, 9 Oct 2019 11:55:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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 08/10/2019 22:33, Paul Walmsley wrote: > On Mon, 7 Oct 2019, 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 is provided by the >> p?d_leaf() functions/macros. >> >> For riscv a page is a leaf page when it has a read, write or execute bit >> set on it. >> >> CC: Palmer Dabbelt >> CC: Albert Ou >> CC: linux-riscv@lists.infradead.org >> Signed-off-by: Steven Price > > Acked-by: Paul Walmsley # for arch/riscv > > Alex has a good point, but probably the right thing to do is to replace > the contents of the arch/riscv/mm/hugetlbpage.c p{u,m}d_huge() functions > with calls to Steven's new static inline functions. The intention is to create new functions that are not dependent on hugepage support in user space. hugetlbpage.c is only built if CONFIG_HUGETLB_PAGE is defined. As you say - the p{u,m}d_huge() functions can be reimplemented using the new static inline functions if desired. Thanks for the review. Steve > > - Paul > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >