Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3341873ybd; Tue, 25 Jun 2019 00:35:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFk5H0z9hpluc2tLxRW6MlwC1pLSX/QZNw812EtvzXYUNn7dVH9ElGip0Lp7X2V9NhFQ9n X-Received: by 2002:a17:902:2ac1:: with SMTP id j59mr80576643plb.156.1561448133067; Tue, 25 Jun 2019 00:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561448133; cv=none; d=google.com; s=arc-20160816; b=Jb58VZXeLA9MuomrNq71y4SVf1FF7qkNs5+by6cQe5SP4OpYaetCE1jpo//W3uoXio +tt/yYKl6Rms+DJdQeOb+kU5sgbKQIEOAZ/O0BZeNGwc7OANKS/PxvBnzWyQzCh9G+Ts 417tTIzpFyYXtdZLnII+ofLrRQsOAW8bDy6dKGoAKaDn45lLLjydxtpM3LfGSnfuvqyH rL/KzoxSLj+n2KKzkVgbkHBQ1br6Cxur4Z1L0smUr5BsPUjYX/+aelj7Gs177Zr7zzQc /uuwUI8hd1j4AMCmTHD6AidkoI7vSmOGEVT/ZrYWN+GCgpOOkQQAb6A91itzioNQdnRz sG1w== 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=WLdNte3IC56FzQtDa2NKteMtr0xoBzGCVFkDEEhaAMk=; b=rxYLaVRn+3fJrrCRsZjyx2lpKQ9wTnT2g6/M7QsTorsboK6/Fg2XkT4EYcIck3tXXK 13X7bLP49OOupZ7OjEeZU8GwJy/1XQxxxSmIokXDdLG+PDsqI0Jz/6bperXJKjPOTopO irlyi+VTvEksMdn2BLdTy77xWylSP1+DSuREfnNAMnDC2sbf27sfVmBNdu1FAxqh5HAK JTzCRFZmMPbvofC8ynYbp+lgki4wKuJZPw2Y/BkGIS7aLOMOUYZlU191UEwqi2Xq+Jtr n3avldNZ/4XTbqVEfm4ipHMcz0MOd4mSajKuATtlMboFNr1iT76/Zf1XMYf+0budg74K hJgw== 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 f4si2008276pjo.97.2019.06.25.00.35.16; Tue, 25 Jun 2019 00:35:33 -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 S1729071AbfFYGOF (ORCPT + 99 others); Tue, 25 Jun 2019 02:14:05 -0400 Received: from verein.lst.de ([213.95.11.211]:59791 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726495AbfFYGOE (ORCPT ); Tue, 25 Jun 2019 02:14:04 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 4350A68B02; Tue, 25 Jun 2019 08:13:32 +0200 (CEST) Date: Tue, 25 Jun 2019 08:13:32 +0200 From: Christoph Hellwig To: Vladimir Murzin Cc: Christoph Hellwig , Vineet Gupta , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Helge Deller , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linux-xtensa@linux-xtensa.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] arm-nommu: remove the partial DMA_ATTR_NON_CONSISTENT support Message-ID: <20190625061332.GC28986@lst.de> References: <20190614144431.21760-1-hch@lst.de> <20190614144431.21760-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Jun 24, 2019 at 03:23:08PM +0100, Vladimir Murzin wrote: > On 6/14/19 3:44 PM, Christoph Hellwig wrote: > > The arm-nommu DMA code supports DMA_ATTR_NON_CONSISTENT allocations, but > > does not provide a cache_sync operation. This means any user of it > > will never be able to actually transfer cache ownership and thus cause > > coherency bugs. > > By the way, Documentation/DMA-attributes.txt doesn't specify cache_sync() as > requirement for DMA_ATTR_NON_CONSISTENT it only states that it is responsibility > of the driver to have all the correct and necessary sync points. True. dma_cache_sync has always been a rather odd interface, as it doesn't specify in what direction we need to sync and doesn't participate in our ownership protocol. So my mid-term plan is to kill it off and replace it with the existing dma_sync_* helpers. This series is the first step towards that.