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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 7BC4FC433E0 for ; Fri, 15 May 2020 21:12:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4FE2F2065C for ; Fri, 15 May 2020 21:12:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dWIlMAQS"; 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 4FE2F2065C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Message-Id:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3wuA+QbGSRzRSz2dHF8BoJG/OvuvcNbnr22i3H53Ikk=; b=dWIlMAQSTnwMVz WRrZWk4pkQMvgfpr/SQ6u4UUPJ8YHnSy2YbbhYK2JFF3G2W7zeW0oq1Q8pPEZJJCBr+Dlw+H5g08F zy7NryQOhAHpduFGi5xHr9OvOAhnnoa0JMLdBM5xLb0eYhxWShsQ+hM6prCN0XFqqW0tK+Ic6BAIV 8Xgq5oZlaIZnRG/w0uKykFXZhNRwmFLeScZGKkwPjwu6n7WeO0ueVdO6vqxBVU4WvnfJ/diigFQ/E qo8ug9BOUZAbETB8YqoTOi2hN8w7NiFfKre4ndv7mPAr+XULUXVxdxTOwYWe/G1avrUazi8IiQ+1s pbVyt+Ax6JUpMG8NaLCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZhcx-0008CU-Uq; Fri, 15 May 2020 21:12:19 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZhcu-0008Ak-Ft; Fri, 15 May 2020 21:12:17 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_141216_567331_A35B7D6D X-CRM114-Status: GOOD ( 13.02 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors 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 , Michael Ellerman , 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" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc