Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4063322ybl; Mon, 13 Jan 2020 07:15:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxIe5n/kPmLd45gP9fUdHqyBhqwZk0VT8A15+GWaVsz5l4keIIrRCu7CiqgyN9Y+KdSux5a X-Received: by 2002:a9d:7d99:: with SMTP id j25mr3591986otn.226.1578928539867; Mon, 13 Jan 2020 07:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578928539; cv=none; d=google.com; s=arc-20160816; b=sLyhR92uNXhIrKKEpbekS9XGN3Pd4baw7ASkwSu5FdvadwvjEQ2Mxq7RL7PjBQeaDt lFeN+QUfmJxnqNOMIcyW1jh5D0Yy/eCRnhnkmJ/wOo1ribknqPYOcN7+JAEIXlvCn7G3 U+ftIu3L62iwGpHDxIMK96Oakd+yXKD3U/35c6ElwERPqkSJ/pZXWp7XrQrNex1T3sJH fQ/hdHJOEKRiF7LHZZ5Yyi3nqN1tcALJ75YfKSnw5zIfkydBLk5rhCdWQkLU2RmoSWRp scb/SIHximlDB7Bg+EfQeZmbTps5GlVRZfH8yCrPQTNlbWwDnf6gMqs8W3ff4VDemxRH pyUg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lKbRqixRncphjxXrR3Yf5qf74/8dA29MnM8RGY8kkjw=; b=xNwwNtn8nYaf0vGy/ZxbLhJpq1+T+YWTM3AYlneYRcYQgNj/5vWCDvWw+lBTb7o/db u8L5e1kF82NNzaMoHtVNZSMa/7cVkeKIT+7f66HJUggn1DcXIz5clV2VSxS7q1AE+87p QmMpcDzrVVuKwXOH+1skmzI5l5fX0lE4GkcFYZMLnOnS24F4AoJz+kxr7g3WHmizf1XL CFbsJ7egWC8ep+AzrjB8cCe3u/zVbm/OK/tjPwq11aC3zXy8ONHDZRYH5rLrJJIg+dZJ RD8ZiwEshSLHsV/5ZLgouqKr9BGipPwxGMxXy8+dexE53R8vbkAIFtom5i13yZ4frM/e 6m2w== 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 p25si6425298oto.191.2020.01.13.07.15.27; Mon, 13 Jan 2020 07:15:39 -0800 (PST) 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 S1729117AbgAMPM5 (ORCPT + 99 others); Mon, 13 Jan 2020 10:12:57 -0500 Received: from verein.lst.de ([213.95.11.211]:41728 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728799AbgAMPM5 (ORCPT ); Mon, 13 Jan 2020 10:12:57 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id E082968B20; Mon, 13 Jan 2020 16:12:53 +0100 (CET) Date: Mon, 13 Jan 2020 16:12:53 +0100 From: Christoph Hellwig To: Jiaxun Yang Cc: Christoph Hellwig , linux-mips@vger.kernel.org, chenhc@lemote.com, paul.burton@mips.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] MIPS: Define pgprot_dmacoherent according to coherentio status Message-ID: <20200113151253.GA10064@lst.de> References: <20200113140705.74605-1-jiaxun.yang@flygoat.com> <20200113145820.GA9817@lst.de> <6A037EB9-B5FE-462F-A6EA-8FD874432E75@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6A037EB9-B5FE-462F-A6EA-8FD874432E75@flygoat.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 On Mon, Jan 13, 2020 at 11:11:58PM +0800, Jiaxun Yang wrote: > > > 于 2020年1月13日 GMT+08:00 下午10:58:20, Christoph Hellwig 写到: > >On Mon, Jan 13, 2020 at 10:07:04PM +0800, Jiaxun Yang wrote: > >> For MIPS chips that support coherentio DMA, it's always safe > >> to make DMA requests cached. > > > >For DMA coherent devices pgprot_dmacoherent isn't even used, so this > >doesn't make sense. > > Hi, > > I'm supposed to use it later in drm/ttm > ttm_bo_util to overwrite pgprot for TTM_PL_SYSTEM. > And I wish this pgropt can always represent dmacoherent pgropt. > Would it be fine? No code outside the core DMA code has any business using pgprot_dmacoherent.