Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2155648ybb; Thu, 26 Mar 2020 23:29:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuofCnZn7K2H+s+VA5P1AQRFHBI0XYYO/Q0+jnLA6P4FHdDf/BfKk0SQV+53cSkA1C99WuX X-Received: by 2002:aca:5d8a:: with SMTP id r132mr3000104oib.129.1585290570355; Thu, 26 Mar 2020 23:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585290570; cv=none; d=google.com; s=arc-20160816; b=Y4HK1tG7ivN0uyc8KlTwAcb/I3yMYCfJ3ti/8s9KOfFaCmWf9JH8NZtbX4eyNcXF1q uW02ISUJQAGmwcbMyK7J8FLXfdUd/doXKYDtZv1FibIHzn4rNBilVkM2nS2pBcHi1HKz R2JwZ/8lqHTWchcpnesxyteNpoSL31Hxxa3KFRYTKPY9IwlgarXqQahTKu/dqlq6ymHx ymgyCthXErHzqnvPD3hveL0DVjcP7g8vlEHz9NUS548lSgp3rUANUQIRy3NBuyt0EKXO 5KM0sFmg6VCOIsHkbB6BzPIiZMX7CSGSr21qmSLjS9Mbkm4BiDjAcUnon+1P4ADvhFPV bjRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature; bh=UoGQjp02SZU51biG4JZ6PBIIfzrJ6T8Qawk+9xg9Btw=; b=WzRiyk87MF6RW/YNraWSytqoODftxSrjy1eJt9oakkPhVM2jdw5f4lzxUy0O26oB3M p0ND963+CXvv3Z5Ksg+xkhkUGcbRBzdf+LAclwP2wGmRyIAcyfQ+WdBRTmJip1C5knBZ rBAK74xzf7fsQAgorD07Qm3SwQJ8Dhhle2tL0eAGmkLTWsxOPA+0iJTISlg7VmSV0dWP xUn+Ujb3figouYzpEWJ4z966VKas/GsBLzZ/CDFnoTIPa/j4nzF+A4gMKtt2GP9wWZfu Xg3tb19anTQV0xxTO6pKBcxiYMvl6ZSSu2yarC9DZYCvkQrOinam7goOnETIwZOjMXs3 604A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=mail header.b=MHijPGAJ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p21si2144756oto.4.2020.03.26.23.29.17; Thu, 26 Mar 2020 23:29:30 -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=@flygoat.com header.s=mail header.b=MHijPGAJ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727335AbgC0G1u (ORCPT + 99 others); Fri, 27 Mar 2020 02:27:50 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17875 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgC0G1t (ORCPT ); Fri, 27 Mar 2020 02:27:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1585290402; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Subject:To:CC:From:Message-ID; bh=UoGQjp02SZU51biG4JZ6PBIIfzrJ6T8Qawk+9xg9Btw=; b=MHijPGAJo0DC6YIAcR8HKhFTs0oCxZuOoFElNhvOFi1bVSjLyk2TXUPTLDllwwuN Bv5GOX6QjxvtsgCK5zGutXlHTTkOsmL2J0soTGrZZGrQTleIy03svp47bgFyWOvWYCS bRbPUH/XMeBmk8H17+3Zufbt27WIBYIwfJJVMWoo= Received: from [10.233.233.252] (115.193.86.228 [115.193.86.228]) by mx.zoho.com.cn with SMTPS id 1585290398265664.6145661046983; Fri, 27 Mar 2020 14:26:38 +0800 (CST) Date: Fri, 27 Mar 2020 14:26:34 +0800 User-Agent: K-9 Mail for Android In-Reply-To: <20200325132756.GA13750@infradead.org> References: <1584932355-3642-1-git-send-email-yangtiezhu@loongson.cn> <1584932355-3642-3-git-send-email-yangtiezhu@loongson.cn> <20200325132756.GA13750@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2 2/3] MIPS: Loongson: Add DMA support for 7A1000 To: Christoph Hellwig , Tiezhu Yang CC: Thomas Bogendoerfer , Huacai Chen , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li From: Jiaxun Yang Message-ID: <7786800D-3B37-4F0D-8E55-17F595D97EF2@flygoat.com> X-ZohoCNMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E4=BA=8E 2020=E5=B9=B43=E6=9C=8825=E6=97=A5 GMT+08:00 =E4=B8=8B=E5=8D=889= :27:56, Christoph Hellwig =E5=86=99=E5=88=B0: >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=2E > >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=2E=2E Here we have a problem that dma_pfn_offset doesn't fit our platform=2E We have multiple dma-ranges that translate in to different address and dma_pfn_offset can only handle single range=20 with fixed offset=2E Thanks=2E --=20 Jiaxun Yang