Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5363497yba; Tue, 30 Apr 2019 13:32:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR8g0Iy3G8wbyTLiLFoijmWsQUATQY0a065UpqV0yAmR57CwbqXkWH/O+KgH+T1Ahsxc6C X-Received: by 2002:aa7:810e:: with SMTP id b14mr30262304pfi.112.1556656362112; Tue, 30 Apr 2019 13:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556656362; cv=none; d=google.com; s=arc-20160816; b=Cb6ndGhGIL+tOu8CQJTij72olAdunfFmQ00HSbt30QzUVbSROQmgj7saOwFw8SkN9R 6LafygRiQZucU4cBgzPcWO6nsiKdDbsRZV2tzKetJg8wX9gTvPY5mqPm36ey+Z5KAqWs zhGf3RFGEBN4PfQgKeG0IAgk6z+ZqCQGYcL+4n+ZaFgDJ94CBQWrLOKV8aZxLhWmXYlx DNjR9xOKqHBy+yJwq1WZ+OzL9HA3FVS4Q99dEKTxs5/x23x4vLWOSavLC5Kni8X10LMo bFRzFzJb2YESt4NGkgflyVCj7NCE6OOIMmEMymSKoStkZ+uoZQ0++wKGGDgHUmusqmDW fyuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mMg2zWfK7mbRNieNo67srvYxYocyKF4Q2AmlGbCXvsk=; b=g4PmEqzY4PJ0PisD9a8xVlk/pG68/yj28kQePBRoiyMdxn7wDHKSKjD7E9+KfH7XDg oa0tgiBvr5mXdC/v1oXvnVKJ+265SNjGQj0vaz+m+KVEYzw130MfI9rfmz2s0lU4NKBZ dNyhUk5KV2j69y1XrwxZ1JBRH+DWnN9lf/s8eabowDZWhxtQMcJ3wlWNhQt/iDUbEUNz tdxLH3Dt1d5t1cBKWyMTTaWml/OF68cyAVrAKMF73uOlbxx0Y/gTUzA8p+5ebAO42vX+ 2IH2iMnfrVTpDO/UCx0PiHRmWu2xej3G2nCYg2pKriEIYcdj9DbREtl6hzvuwQ1VJPYi 0YZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si39831997pfh.257.2019.04.30.13.32.25; Tue, 30 Apr 2019 13:32:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726372AbfD3UaH (ORCPT + 99 others); Tue, 30 Apr 2019 16:30:07 -0400 Received: from verein.lst.de ([213.95.11.211]:48956 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfD3UaH (ORCPT ); Tue, 30 Apr 2019 16:30:07 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 9E22067358; Tue, 30 Apr 2019 22:29:47 +0200 (CEST) Date: Tue, 30 Apr 2019 22:29:47 +0200 From: Christoph Hellwig To: Paul Burton Cc: Christoph Hellwig , Ralf Baechle , James Hogan , Ley Foon Tan , Michal Simek , Bartlomiej Zolnierkiewicz , "linux-mips@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-fbdev@vger.kernel.org" Subject: Re: [PATCH 5/7] MIPS: use the generic uncached segment support in dma-direct Message-ID: <20190430202947.GA30262@lst.de> References: <20190430110032.25301-1-hch@lst.de> <20190430110032.25301-6-hch@lst.de> <20190430201041.536amvinrcvd2wua@pburton-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190430201041.536amvinrcvd2wua@pburton-laptop> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 08:10:43PM +0000, Paul Burton wrote: > This series looks like a nice cleanup to me - the one thing that puzzles > me is the !PageHighMem check above. > > As far as I can see arch_dma_prep_coherent() should never be called with > a highmem page, so would it make more sense to either drop this check or > perhaps wrap it in a WARN_ON()? dma_alloc_from_contigous can return highmem pages depending on where the CMA area is located. But given that these pages don't have a direct kernel mapping we also shouldn't have to flush the caches for them.