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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 20C16C433E0 for ; Fri, 15 May 2020 21:13:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88F36205CB for ; Fri, 15 May 2020 21:13:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="nxT0Ssf9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88F36205CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49P1Nv1qKYzDr9P for ; Sat, 16 May 2020 07:13:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux-foundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=akpm@linux-foundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=nxT0Ssf9; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49P1M51wYvzDr31 for ; Sat, 16 May 2020 07:12:17 +1000 (AEST) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 658E2205CB; Fri, 15 May 2020 21:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589577135; bh=UmRPGOLdKmuTI3Qv0jzWmP0JQ6FJlc6TDky71yMCXsw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nxT0Ssf9yY8pLVLUEFt5SAsZlyL5o6RvbYcpe/Ogb/hZ+Ibv3VYpsIHopMwIvk69A +v0QRtIwEwpLk0FCwhPrY/meT71ffNnp97a68i1ipAlCz7NidwUH9DVZrUpfKzkMPS TuSlq3nyhe5fsuqvT1isjduKVkMQeXc1Kt6J9V7M= Date: Fri, 15 May 2020 14:12:11 -0700 From: Andrew Morton To: Mike Rapoport Subject: Re: [PATCH v2 00/12] mm: consolidate definitions of page table accessors Message-Id: <20200515141211.653db07a4e7142107a57cf24@linux-foundation.org> In-Reply-To: <20200514170327.31389-1-rppt@kernel.org> References: <20200514170327.31389-1-rppt@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-m68k@vger.kernel.org, Rich Felker , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Catalin Marinas , Heiko Carstens , linux-mips@vger.kernel.org, Max Filippov , Guo Ren , Matthew Wilcox , sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-riscv@lists.infradead.org, Vincent Chen , Will Deacon , Greg Ungerer , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Brian Cain , Helge Deller , x86@kernel.org, Russell King , Ley Foon Tan , Mike Rapoport , Ingo Molnar , Geert Uytterhoeven , linux-parisc@vger.kernel.org, Mark Salter , Matt Turner , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, Tony Luck , Borislav Petkov , Greentime Hu , Paul Walmsley , Stafford Horne , linux-csky@vger.kernel.org, Guan Xuetao , linux-arm-kernel@lists.infradead.org, Chris Zankel , Michal Simek , Thomas Bogendoerfer , Yoshinori Sato , Nick Hu , linux-mm@kvack.org, Vineet Gupta , linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, Thomas Gleixner , Richard Weinberger , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, 14 May 2020 20:03:15 +0300 Mike Rapoport wrote: > The low level page table accessors (pXY_index(), pXY_offset()) are > duplicated across all architectures and sometimes more than once. For > instance, we have 31 definition of pgd_offset() for 25 supported > architectures. > > Most of these definitions are actually identical and typically it boils > down to, e.g. > > static inline unsigned long pmd_index(unsigned long address) > { > return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1); > } > > static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) > { > return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); > } > > These definitions can be shared among 90% of the arches provided XYZ_SHIFT, > PTRS_PER_XYZ and xyz_page_vaddr() are defined. > > For architectures that really need a custom version there is always > possibility to override the generic version with the usual ifdefs magic. > > These patches introduce include/linux/pgtable.h that replaces > include/asm-generic/pgtable.h and add the definitions of the page table > accessors to the new header. hm, > 712 files changed, 684 insertions(+), 2021 deletions(-) big! There's a lot of stuff going on at present (I suspect everyone is sitting at home coding up a storm). However this all merged up fairly cleanly, haven't tried compiling it yet.