Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1830985imm; Thu, 23 Aug 2018 09:26:13 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyQZqz4skNXI1fHBGLKUvPQpolCICopUE6QkURQK2EiHAm9ConJ59qw53Mul6rt4/prJjSN X-Received: by 2002:a63:df04:: with SMTP id u4-v6mr56695429pgg.434.1535041573440; Thu, 23 Aug 2018 09:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535041573; cv=none; d=google.com; s=arc-20160816; b=SxCCzCnNvgcngM+HJwwN3PGbCq7U4GxxamfQSlk2RyN/HSqSmk7392z3UXkoY6kjnd 8tUIjk4sCpQa8QZNFd9PMMQDRjYmm4LLj7Vl3rxC+VGnDAbo1ly/wm/UBPrPYasd3y/B H0lPus8KKMK0F3bk6RMPOcncsUjd12fki8YRTlci/YGgFrx+5QI5Wx4K0TsjJHBPioeP jvGGx/pxt059A4S17lEPVuUOQfedoFrUtYkMYh128UJFei372+K7AEqathQx3MK+tM/Q tHkhLhYXgYfAjPgG3Xp+ZJCpt+gTBee1yd4eXPxo6545Toyt7tSD59Rt86QmVKouMjpA TcCQ== 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:arc-authentication-results; bh=ZJcQkx3BjoRSTtZN89BYcuQoM/RGNdAkzc1dBteMLxU=; b=YEOdRuvoY8uEzCNbFi+yb3rlXcFoFDAtFyTgMEzGZchLSVNMFFqB4UdtWPrGSKpMBY sgacOZNkscsTPXSip6ca5e5I6T9ALPZgIpvaxEd3ZTOVkrZ9C2xmg0TOlDOz+5tkkFiI YQLyQypi0n/21rT7h7rUt7ia7Jipb7YrZIe78+BUBA4NdT7BUkYQEO1LHlN18OvIA/xC oG4G5fzdSLO9DQvjjTdOg1LaDethDo2+krDT8MB0AZXbtAinIm8+WNpdP1Kv3G/zBQ4e L9Kbkr+tLN0ZD5/8lkthr/kh1DnKq1rTE3UOuXfQhiwpY817MALYslcYjOHH/z2JX4U9 6U5g== 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 5-v6si4517603plt.342.2018.08.23.09.25.58; Thu, 23 Aug 2018 09:26:13 -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 S1731111AbeHWRdX (ORCPT + 99 others); Thu, 23 Aug 2018 13:33:23 -0400 Received: from verein.lst.de ([213.95.11.211]:54842 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730065AbeHWRdX (ORCPT ); Thu, 23 Aug 2018 13:33:23 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 52AF268E4C; Thu, 23 Aug 2018 16:05:25 +0200 (CEST) Date: Thu, 23 Aug 2018 16:05:25 +0200 From: "hch@lst.de" To: Eugeniy Paltsev Cc: Vineet Gupta , "linux-snps-arc@lists.infradead.org" , "hch@lst.de" , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "Alexey.Brodkin@synopsys.com" Subject: Re: [PATCH v2 2/4] ARC: allow to use IOC and non-IOC DMA devices simultaneously Message-ID: <20180823140525.GA26121@lst.de> References: <20180730162636.3556-1-Eugeniy.Paltsev@synopsys.com> <20180730162636.3556-3-Eugeniy.Paltsev@synopsys.com> <1534180089.3962.68.camel@synopsys.com> <81ddd506-1f7e-db82-4c77-ff08b1c15dd3@synopsys.com> <1534963226.3962.215.camel@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1534963226.3962.215.camel@synopsys.com> 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 Btw, given that I assume this is 4.20 material now, any chance we could merge it through the dma-mapping tree? I have some major changes pending that would clash if done in a different tree, so I'd rather get it all together. > We check this flag in arch_dma_alloc (which are used in non-coherent case) to > skip MMU mapping if we are advertised that consistency is not required. > > So, actually we can get rid of this flag checking in arch_dma_alloc and > simply always do MMU mapping to enforce non-cachability and return > non-cacheable memory even if DMA_ATTR_NON_CONSISTENT is passed. > But I don't sure we want to do that. I plan to kill this flag for 4.20 (or 4.20 at latest) in favor of a better interface. But your implementation looks ok, so I'm fine with keeping it for now.