From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754348AbeDZJY0 (ORCPT ); Thu, 26 Apr 2018 05:24:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58940 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753403AbeDZJYY (ORCPT ); Thu, 26 Apr 2018 05:24:24 -0400 Date: Thu, 26 Apr 2018 02:24:22 -0700 From: Christoph Hellwig To: Daniel Vetter Cc: Russell King - ARM Linux , Christoph Hellwig , Linux Kernel Mailing List , amd-gfx list , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Jerome Glisse , iommu@lists.linux-foundation.org, dri-devel , Dan Williams , Thierry Reding , Logan Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [Linaro-mm-sig] noveau vs arm dma ops Message-ID: <20180426092422.GA26825@infradead.org> References: <20180425054855.GA17038@infradead.org> <20180425064335.GB28100@infradead.org> <20180425074151.GA2271@ulmo> <20180425085439.GA29996@infradead.org> <20180425100429.GR25142@phenom.ffwll.local> <20180425153312.GD27076@infradead.org> <20180425225443.GQ16141@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 26, 2018 at 11:20:44AM +0200, Daniel Vetter wrote: > The above is already what we're implementing in i915, at least > conceptually (it all boils down to clflush instructions because those > both invalidate and flush). The clwb instruction that just writes back dirty cache lines might be very interesting for the x86 non-coherent dma case. A lot of architectures use their equivalent to prepare to to device transfers. > One architectural guarantee we're exploiting is that prefetched (and > hence non-dirty) cachelines will never get written back, but dropped > instead. And to make this work you'll need exactly this guarantee.