From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 13 May 2020 08:23:20 +0300 From: Mike Rapoport Subject: Re: [PATCH 08/12] mm: pgtable: add shortcuts for accessing kernel PMD and PTE Message-ID: <20200513052320.GO14260@kernel.org> References: <20200512184422.12418-1-rppt@kernel.org> <20200512184422.12418-9-rppt@kernel.org> <20200512192441.GZ16070@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200512192441.GZ16070@bombadil.infradead.org> To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, Andrew Morton , Arnd Bergmann , Borislav Petkov , Brian Cain , Catalin Marinas , Chris Zankel , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Ungerer , Guan Xuetao , Guo Ren , Heiko Carstens , Helge Deller , Ingo Molnar , Ley Foon Tan , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Nick Hu , Paul Walmsley , Richard Weinberger , Rich Felker , Russell King , Stafford Horne , Thomas Bogendoerfer , Thomas Gleixner , Tony Luck , Vincent Chen , Vineet Gupta , Will Deacon , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Mike Rapoport List-ID: On Tue, May 12, 2020 at 12:24:41PM -0700, Matthew Wilcox wrote: > On Tue, May 12, 2020 at 09:44:18PM +0300, Mike Rapoport wrote: > > +++ b/include/linux/pgtable.h > > @@ -28,6 +28,24 @@ > > #define USER_PGTABLES_CEILING 0UL > > #endif > > > > +/* FIXME: */ > > Fix you what? Add documentation? Ouch, indeed :) > > +static inline pmd_t *pmd_off(struct mm_struct *mm, unsigned long va) > > +{ > > + return pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, va), va), va), va); > > +} -- Sincerely yours, Mike.