Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3522303imm; Sun, 19 Aug 2018 23:25:45 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwAGQpA3Y7pIidJMugDzhf+OpCAQVXmPLt4dFhgAluYNmGpTPHNHbnxZzKj2v2les/WjAYa X-Received: by 2002:a17:902:5a87:: with SMTP id r7-v6mr12267406pli.247.1534746345763; Sun, 19 Aug 2018 23:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534746345; cv=none; d=google.com; s=arc-20160816; b=vOPYgQhNV3VgM88+rQ/fVd8CBBL5XuNDZ+xrYw512PWwTHz6u9DNp4fFwTj/iUWYHd s5oiLzUfC/jVUpJ+RPt9A7w5/9S6E3SwKBS4Gd9Qn64Gn4hugT6GTR75PwVbStuUQxnk FM5IpFsN4LyJOFiLqSv+pXuG68bh117jjGs85WhPYv81HMbm9sMFgxQVfYF1JBaeziwb AAi4uZwtoei5G32AUHcvnMAuhwTgAgv6WaCWTezxR4cAWV254AkCPkM7ywb9MRjrbY0j 7/ktbYHmAKQhP1nOG1wncfeWEUQmH7DoNiNhXBEUAEW3/TUdMeLHfB9nRIivBs+ETvnj deEQ== 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:dkim-signature:arc-authentication-results; bh=ty1i59lLQIOumb6ra5mWlyUebheLVKRTqb0SYJxYM1k=; b=qykQ8R7JQ2Mvbo/M67JXQJUFrOev7ILzpZ+hW9VPcSb/zLClS5hyKY6L//inrT8u9v Ch+nV89/8iUiu0Od9W22WaWyJaRIv/nUK8vbX+57wm3qy8WeFJK412/C1ZvChE6J/cKX X8U+i/I2dSvA6+ds2lMlknFfULUb4hkR48i4pLSr5deKmtn1ea+IEzKdwnZtfu6DKQVb 576LnLCJaEINqJ1MHE+DWac3f8EP8o0akGWecnQ8XcAYvxHhfuP7aXnQlpOEsYwrJGM7 59Vgbu5oLUbroDx5DCQJC4yGvCIBWWq8DJw74dfbhpwMq53oIlcf13uqd1Z2tNaz2s1a 1gMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=gCv2HkzR; 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 t2-v6si5718501pgm.626.2018.08.19.23.25.15; Sun, 19 Aug 2018 23:25:45 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=gCv2HkzR; 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 S1726201AbeHTJhu (ORCPT + 99 others); Mon, 20 Aug 2018 05:37:50 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48082 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbeHTJhu (ORCPT ); Mon, 20 Aug 2018 05:37:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ty1i59lLQIOumb6ra5mWlyUebheLVKRTqb0SYJxYM1k=; b=gCv2HkzRPvOdZF2wEKvWEi7PY tsHXB5U0Zwvpr7bWFAbEBn1sGh4FGaLooZpBMaK0hzw5SYwRyVCx6hKjv2t3lm3rlm50aRpoVz19N 06VbTglJWFJ3w3k8BBjGR4hg1Oga1NCrFo6nlqIr8C22cQ7zuijrrfeOpwiv1nVb1iM765Y3ryK1Z qrdwxUIwjyuKJrf9WESCcBh9PyCf35Hf7rh4HvomMGMIApFn4Fo6ejFgwP7jh7sO/YyYDiHXNEXk0 eT+KS7mQ8fHcJE7i8YS17tgc1QfMSb16Ne3TthOmDTlWpEDxUh0S1x+E99a5bLats6hGGsW4X6zd5 cYodpDHZg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1frdb4-0006Jq-9c; Mon, 20 Aug 2018 06:23:26 +0000 Date: Sun, 19 Aug 2018 23:23:26 -0700 From: Christoph Hellwig To: David Miller Cc: brian.brooks@linaro.org, antoine.tenart@bootlin.com, maxime.chevallier@bootlin.com, ymarkman@marvell.com, stefanc@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.topel@intel.com, brian.brooks@arm.com Subject: Re: [PATCH] net: mvpp2: avoid bouncing buffers Message-ID: <20180820062326.GA22222@infradead.org> References: <20180820024730.9147-1-brian.brooks@linaro.org> <20180819.195505.1988137313680465320.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180819.195505.1988137313680465320.davem@davemloft.net> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 19, 2018 at 07:55:05PM -0700, David Miller wrote: > From: Brian Brooks > Date: Sun, 19 Aug 2018 21:47:30 -0500 > > > @@ -5126,6 +5126,12 @@ static int mvpp2_probe(struct platform_device *pdev) > > } > > > > if (priv->hw_version == MVPP22) { > > + /* Platform code may have set dev->dma_mask to point > > + * to dev->coherent_dma_mask, but we want to ensure > > + * they take different values due to comment below. > > + */ > > + pdev->dev.dma_mask = &priv->dma_mask; > > The platform code might be doing this exactly because it cannot support > different coherent and streaming DMA masks. > > Well, in any case, the platform code is doing it for a reason and > overriding this in a "driver" of all places seems totally > inappropriate and at best a layering violation. > > I would rather you fix this in a way that involves well defined APIs > that set the DMA masks or whatever to the values that you need, rather > than going behind the platform code's back and changing the DMA mask > pointer like this. Agreed. What platform do you see this issue on?