Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp617246ybb; Wed, 25 Mar 2020 06:28:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtATr+f8jJtsDO5NgrW9GGP7mDwQ3mlhbCMXlOaBgNuHYLDp5o8x4swjRuittvbVzWRWD+9 X-Received: by 2002:a05:6830:1f0c:: with SMTP id u12mr2391584otg.59.1585142928908; Wed, 25 Mar 2020 06:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585142928; cv=none; d=google.com; s=arc-20160816; b=fAQTM7r0OU5R8Lhr7EfdnrVC8U6HSJpyFbGPNiPeilJH66TdyisWYg9dRZQkSvrTMx BqK9E741bUxTPtuj7300s6eMC1YSWDB/6MGSOuFUo1LzKIaI8Ko10mPzhwAgVoximyll hmRCUYLXqmB3M2WI0iYvxbXaE5aTSdHOWSGSJw2nS8ETTcIkX2VRkfVePA4pB7+k+gg+ B1VQh1kRtQoT6Qp6W8E7kATkwRjB56ztXyQ9L3iByXoBvOjjcEJx2pElG3x35Vb/ntiv v2FGTAXcU+lJqls+CQ9TOwdLL5N2bLNYuVNR2VmMAdlQVzbgsHsClXscTin2qhOXUeM0 divA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2NO/n6kduwBIqc4l0ZX8BdD5kNqK6OZFb73WmpZkDbA=; b=fH3XC7xDfy2SXh8f6F8MsT6B/K0Pm8SZT2nBRMg2U+qC+ueO1Y0c9T3S/jq0Cmma7V EKQU28vWFsipD3QirTE3ai0VBSFGsRKUf5R+Si/3ddRtQwOB0kxarsSR1f7aRwVqS9zR iX6p/k+k/aaqjs1zLG2ypUXcaHIEoZwMKXkX4c3oLKLPG8Ic6zGrT5JHIPFB2w08WV/J NXhlfI2CfVvNPAhKsLrpUD3LukGNI7rgaa6SAF8PskgY2P4m8YbB6vaJAjtlwA3QHkvR UXDhbkxTI5Tqm2ECBqhnvFD/WIe6N+TYan/wJkQ6qiZ+lAx2Fg7D0uOBdV+eWJnZ6gsP dv3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jlzPnzl9; 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 b6si10992989otj.275.2020.03.25.06.28.34; Wed, 25 Mar 2020 06:28:48 -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=jlzPnzl9; 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 S1727416AbgCYN2M (ORCPT + 99 others); Wed, 25 Mar 2020 09:28:12 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33214 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbgCYN2M (ORCPT ); Wed, 25 Mar 2020 09:28:12 -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; bh=2NO/n6kduwBIqc4l0ZX8BdD5kNqK6OZFb73WmpZkDbA=; b=jlzPnzl9AXcsu1Q6Jqasiq7vke JBmxbJMAxZOqyMXT/D3NU0q2UJrIJy4nV47kZ3AN1EKqNLCVYGvk9MN1aquTjlc33LvR4aa5/TYdw F8ptj101FjBfXMqdDStSGHSeoQbHaptENbZDhzD4dQQeNJziCAc8Vnq9g5FLUdq6C+95qk1+V/Fud hkRrHmyTF5+egWjVECXrhEkPewed7x+c9fZkiEOX2vWteWLGRlQPpGe5Kjy2YEHOImvuOb4ca+/fa 4Q4AA/cbX8sRJWYSXRLRwte4TnCMQP2GgxosW05UPga49CUvuTY9QdfAlca2XhyEG444NIEGoIzzg jJxhfwGA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH64a-00055b-S1; Wed, 25 Mar 2020 13:27:56 +0000 Date: Wed, 25 Mar 2020 06:27:56 -0700 From: Christoph Hellwig To: Tiezhu Yang Cc: Thomas Bogendoerfer , Huacai Chen , Jiaxun Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: Re: [PATCH v2 2/3] MIPS: Loongson: Add DMA support for 7A1000 Message-ID: <20200325132756.GA13750@infradead.org> References: <1584932355-3642-1-git-send-email-yangtiezhu@loongson.cn> <1584932355-3642-3-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584932355-3642-3-git-send-email-yangtiezhu@loongson.cn> 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 Mon, Mar 23, 2020 at 10:59:14AM +0800, Tiezhu Yang wrote: > Implement __phys_to_dma() and __dma_to_phys() according to the > node id offset in the 7A1000 DMA route config register. Can you please try to just use the dma_pfn_offset field in struct device for all loongson platforms? I'm pretty sure I asked for that last time around..