From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Tue, 25 Jun 2019 07:46:49 +0000 Subject: Re: [PATCH 04/16] MIPS: use the generic get_user_pages_fast code Message-Id: <20190625074649.GD30815@lst.de> List-Id: References: <20190611144102.8848-1-hch@lst.de> <20190611144102.8848-5-hch@lst.de> <20190621140542.GO19891@ziepe.ca> In-Reply-To: <20190621140542.GO19891@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jason Gunthorpe Cc: Christoph Hellwig , Kamal Dasu , Ralf Baechle , Linus Torvalds , Paul Burton , James Hogan , Yoshinori Sato , Rich Felker , "David S. Miller" , Nicholas Piggin , Khalid Aziz , Andrey Konovalov , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-mips@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, x86@kernel.org, linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 11:05:42AM -0300, Jason Gunthorpe wrote: > Today this check is only being done on the get_user_pages_fast() - > after this patch it is also done for __get_user_pages_fast(). > > Which means __get_user_pages_fast is now non-functional on a range of > MIPS CPUs, but that seems OK as far as I can tell, so: > However, looks to me like this patch is also a bug fix for this: Yes. > > - pgdp = pgd_offset(mm, addr); > > - do { > > - pgd_t pgd = *pgdp; > > - > > - next = pgd_addr_end(addr, end); > > - if (pgd_none(pgd)) > > - goto slow; > > - if (!gup_pud_range(pgd, addr, next, gup_flags & FOLL_WRITE, > > - pages, &nr)) > > This is different too, the core code has a p4d layer, but I see that > whole thing gets NOP'd by the compiler as mips uses pgtable-nop4d.h - > right? Exactly.