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=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 C0B0FC43381 for ; Mon, 18 Feb 2019 11:29:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FC3C2177E for ; Mon, 18 Feb 2019 11:29:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tzEbac8+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730144AbfBRL3f (ORCPT ); Mon, 18 Feb 2019 06:29:35 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:43710 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727084AbfBRL3e (ORCPT ); Mon, 18 Feb 2019 06:29:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9zVouE7YOK8js3D9q4XzpJUxoMNosNwdoryRQYjPG0E=; b=tzEbac8+iPNgeGV+p0XkPk8Bp iUaJYYy9vePbQcLSuhi8zC/5QKr4hKNVF8fXj3LOCPR6Pgpa8+Y7gduDH5xAlP4LED1Ml/cGoigXj A5rcb8QXfNYQhw8iobVYN7jSRwRp3l5uQZTfF2CDY6ZuM6PsxuIV23B9msvwWyPec2Kx7dEID6a/A AXRNy4ZBLSbWyMCX8+Q7FtE9KSM6Mg2PTN8/NXsjxH0V5uIVy7UQ8xPNYgVpTcGd17HLbmJFzFy0X RpL1f0qFldAammcBhMoyGvSqhvz+t8vPUxzQkMi9LQn4j19QJwt94B3ZQoF6rOUDcpcGH6rgSeS/k FR5n5UI5A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvh6z-0000Gc-DF; Mon, 18 Feb 2019 11:29:25 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A14E423EAF75C; Mon, 18 Feb 2019 12:29:22 +0100 (CET) Date: Mon, 18 Feb 2019 12:29:22 +0100 From: Peter Zijlstra To: Steven Price Cc: linux-mm@kvack.org, Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?iso-8859-1?B?Suly9G1l?= Glisse , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/13] arm64: mm: Add p?d_large() definitions Message-ID: <20190218112922.GT32477@hirez.programming.kicks-ass.net> References: <20190215170235.23360-1-steven.price@arm.com> <20190215170235.23360-2-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190215170235.23360-2-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 Fri, Feb 15, 2019 at 05:02:22PM +0000, Steven Price wrote: > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index de70c1eabf33..09d308921625 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -428,6 +428,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, > PMD_TYPE_TABLE) > #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ > PMD_TYPE_SECT) > +#define pmd_large(x) pmd_sect(x) > > #if defined(CONFIG_ARM64_64K_PAGES) || CONFIG_PGTABLE_LEVELS < 3 > #define pud_sect(pud) (0) > @@ -435,6 +436,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, > #else > #define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \ > PUD_TYPE_SECT) > +#define pud_large(x) pud_sect(x) > #define pud_table(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \ > PUD_TYPE_TABLE) > #endif So on x86 p*d_large() also matches p*d_huge() and thp, But it is not clear to me this p*d_sect() thing does so, given your definitions. See here why I care: http://lkml.kernel.org/r/20190201124741.GE31552@hirez.programming.kicks-ass.net