Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp760718ybp; Wed, 9 Oct 2019 03:57:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzbAODd0ejEBh6BAgC1JodJjujh19IjQZQB8tbTyKM+iJ+thD0b4iTYzCWTfzpq0zHUsNj X-Received: by 2002:a50:e71a:: with SMTP id a26mr2250855edn.265.1570618620425; Wed, 09 Oct 2019 03:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570618620; cv=none; d=google.com; s=arc-20160816; b=d+SwGojwqFLcA9ON2zWqLzHxqM4QpFsMiyic4kit/YyIEXboLoibiV6rjMIC02Mdq/ WiLVSEN7XaQCDzDxlv91OHp3/zZS3zziSlbX6lGHY6aTd4kHH98UoPiZ5wdwr4TEu88t Xh17u1ZXgCW2WBRhV2RRO6p5ia6FWrbAauof3WkxVIvpXt4h/eGtq2+hC/QEHxWk0V1p hbr1PQDD9WlhM9yJh3KKQ2hU8BGzEvqQsdYKJwHqswyInxZDbT1ti1BLZk82D6sWa6UW kVCOncY4134O9yA4Z+NrzauQ3HbZWGYy9vyqDK5m2WyJVXdkwMOn1ARROWAbSWUOHnrT +Mtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=tERC5Ghc4z8Sd4yrNRN1vKu/Q0Z9x0hZYZ9skxI5EpY=; b=odlKd0M0EXHKAJOvACchkhdh9ah8sxmLblVe3SaX5biWg9pLxXPT/xX64hIRVEsMij +PdIwUT95t4rCb5EzpXmmp6xFQKALw2i7O1y5layyV1FrL6D3q2c+DfUmts0l4nXM5/p rjW1iNjT17CIRK9fnuQNXiPQT5O53Ev3VmwL6D+XGzzwNZU/aPID2oklwNkJMqka3Eba JEFiO560I+AmcAG3LO/bzysOCFZXBzFBjil67zy0JabJbZXaGU5Ghe7EWCyNepMpKjqg ZIM/gc8FKalq40bSBUZwFBbsQmdRfQSQguUhDcEjc1ocW4Hrm8big/CfS/Pd9AD/RpNt 1tpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qq19si868855ejb.85.2019.10.09.03.56.37; Wed, 09 Oct 2019 03:57:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730904AbfJIKzs (ORCPT + 99 others); Wed, 9 Oct 2019 06:55:48 -0400 Received: from foss.arm.com ([217.140.110.172]:59716 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbfJIKzs (ORCPT ); Wed, 9 Oct 2019 06:55:48 -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 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >