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 60049C47082 for ; Tue, 8 Jun 2021 07:48:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A26461184 for ; Tue, 8 Jun 2021 07:48:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbhFHHuN (ORCPT ); Tue, 8 Jun 2021 03:50:13 -0400 Received: from foss.arm.com ([217.140.110.172]:51446 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbhFHHuJ (ORCPT ); Tue, 8 Jun 2021 03:50:09 -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 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.