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_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 3A732C4743D for ; Tue, 8 Jun 2021 07:48:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C35C861184 for ; Tue, 8 Jun 2021 07:48:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C35C861184 Authentication-Results: mail.kernel.org; dmarc=fail (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 299236B0070; Tue, 8 Jun 2021 03:48:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 220D86B0071; Tue, 8 Jun 2021 03:48:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 09B0C6B0072; Tue, 8 Jun 2021 03:48:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0254.hostedemail.com [216.40.44.254]) by kanga.kvack.org (Postfix) with ESMTP id C7A366B0070 for ; Tue, 8 Jun 2021 03:48:18 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 6BE708249980 for ; Tue, 8 Jun 2021 07:48:18 +0000 (UTC) X-FDA: 78229778676.05.B02C226 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf11.hostedemail.com (Postfix) with ESMTP id B2D852001097 for ; Tue, 8 Jun 2021 07:48:14 +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 E7F53ED1; Tue, 8 Jun 2021 00:48:16 -0700 (PDT) Received: from [10.163.83.140] (unknown [10.163.83.140]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 500663F719; Tue, 8 Jun 2021 00:48:08 -0700 (PDT) Subject: Re: [PATCH] mm/thp: Define default pmd_pgtable() To: Geert Uytterhoeven Cc: Linux MM , Andrew Morton , Nick Hu , Richard Henderson , Vineet Gupta , Catalin Marinas , Will Deacon , Guo Ren , Brian Cain , Michal Simek , Thomas Bogendoerfer , Ley Foon Tan , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Michael Ellerman , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Heiko Carstens , Yoshinori Sato , "David S. Miller" , Jeff Dike , Thomas Gleixner , Chris Zankel , Linux-Arch , Linux Kernel Mailing List References: <1623130327-13325-1-git-send-email-anshuman.khandual@arm.com> From: Anshuman Khandual Message-ID: <8f851179-586d-4491-e650-ed3e5ea7b002@arm.com> Date: Tue, 8 Jun 2021 13:18:54 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Stat-Signature: q53oyewm5gktqyd9uqtkhx6feq6qcbsg X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B2D852001097 X-HE-Tag: 1623138494-389207 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 6/8/21 12:28 PM, Geert Uytterhoeven wrote: > Hi Anshuman, > > On Tue, Jun 8, 2021 at 7:31 AM Anshuman Khandual > wrote: >> Currently most platforms define pmd_pgtable() as pmd_page() duplicating the >> same code all over. Instead just define a default value i.e pmd_page() for >> pmd_pgtable() and let platforms override when required via . >> All the existing platform that override pmd_pgtable() have been moved into >> their respective header in order to precede before the new >> generic definition. This makes it much cleaner with reduced code. >> Signed-off-by: Anshuman Khandual > Thanks for your patch! > >> This patch has been built tested across multiple platforms. But the m68k >> changes in particular might not be optimal, followed the existing switch >> from (arch/m68k/include/asm/pgalloc.h). > Indeed. Why not move them to the existing > arch/m68k/asm/{sun3,mcf,motorola}_pgtable.h>, instead of introducing > yet another #if/#elif/#else/#endif block? > Yes, that works. Will change.