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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT 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 08CE3C48BD4 for ; Tue, 25 Jun 2019 07:49:14 +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 B6EBD20659 for ; Tue, 25 Jun 2019 07:49:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6EBD20659 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45XywR4KhlzDqNt for ; Tue, 25 Jun 2019 17:49:11 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=newverein.lst.de; envelope-from=hch@lst.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) (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 45XytN4nrPzDq5y for ; Tue, 25 Jun 2019 17:47:24 +1000 (AEST) Received: by newverein.lst.de (Postfix, from userid 2407) id 3C8A768B02; Tue, 25 Jun 2019 09:46:50 +0200 (CEST) Date: Tue, 25 Jun 2019 09:46:49 +0200 From: Christoph Hellwig To: Jason Gunthorpe Subject: Re: [PATCH 04/16] MIPS: use the generic get_user_pages_fast code Message-ID: <20190625074649.GD30815@lst.de> References: <20190611144102.8848-1-hch@lst.de> <20190611144102.8848-5-hch@lst.de> <20190621140542.GO19891@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190621140542.GO19891@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) 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: Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Khalid Aziz , Paul Mackerras , sparclinux@vger.kernel.org, Christoph Hellwig , Yoshinori Sato , Kamal Dasu , x86@kernel.org, James Hogan , Andrey Konovalov , Nicholas Piggin , Linus Torvalds , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , 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 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.