Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1487662ybh; Fri, 13 Mar 2020 02:04:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu7CVgqG5s6iDZahtU4O+tixAVNODvWT5Bb8WG6Os+bjM2B+jdEWCit8/MufqIKmpWRywMA X-Received: by 2002:a05:6830:119:: with SMTP id i25mr8736350otp.81.1584090281318; Fri, 13 Mar 2020 02:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584090281; cv=none; d=google.com; s=arc-20160816; b=H9hmLXz0KQc/qEN/xu5rpsbDKpgq8hRN/ob21V3q4XPpBVXk6SO5iKkiQDAlJs5QS4 iVIwdZHJtOP2+5WMxZ4jTz0L25VuLuZgephI6OZCnMrnZxydU0L66Q+GA8L0ud1MMKpa xOVnz/p3A4zO2k6I/Yo/51DiCgrMAyWG4htm4UVZgoYv0fg5aL3vA08wWunqDZprfAMQ S9iuS356lxk0mav31gMNaLH9UjRpxgJBIWnUCZ6DBjFnXmIk7c+tL7g5E9XxPq6lpcG4 ASg7hkh62g6sSemzmlX6tIMoz8vyMpKoA4BldwJM3TJEeVqSchDRex6n7TXB47T8N8mZ smfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=iV305OZvOhrD4nQSldtl4V4LbNa90ndjB6efY0tRb5w=; b=YJ9Es+hZz5B8nPYK0TJU5jvPhMD1aqz7L4+lt/NidNwaJt9YQvlT0+guI9hlvRPL0X CUFoz61Nz031urjGYF5tl3XDjoCPMR5lyDzm8NZF+Bh3HyLNEJw+6ovMUbu4b54ARB8A DGAlHEx3GohLb/WvdeWOfUHjQTO19dL2IxuGeKnjenD4UtHi6C/Qt05poq7WDt4qd7UZ cvH2rSGbYKgQCuaQrwvt7O7R6Qp5z2nZUg8Mh2kj1EDxc2VYKYZTJ0amJNxti87GS1tx PBCvSyKTmf+QhStHZ1gr4aSjx0k0uEfV6OPPkUxBFUP/e6vfR/RP76yMGZIazMSRfgIr Oofw== 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 y25si5463745otj.304.2020.03.13.02.04.28; Fri, 13 Mar 2020 02:04:41 -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 S1726504AbgCMJDw (ORCPT + 99 others); Fri, 13 Mar 2020 05:03:52 -0400 Received: from mail.loongson.cn ([114.242.206.163]:56746 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726310AbgCMJDv (ORCPT ); Fri, 13 Mar 2020 05:03:51 -0400 Received: from [10.130.0.70] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxL2hUTGteYx4aAA--.10S3; Fri, 13 Mar 2020 17:03:25 +0800 (CST) Subject: Re: [PATCH 4/6] MIPS: Loongson: Add DMA support for 7A1000 To: Christoph Hellwig References: <1583742206-29163-1-git-send-email-yangtiezhu@loongson.cn> <1583742206-29163-5-git-send-email-yangtiezhu@loongson.cn> <20200313082451.GA20331@infradead.org> Cc: Thomas Bogendoerfer , Huacai Chen , Jiaxun Yang , Bjorn Helgaas , Jens Axboe , linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li From: Tiezhu Yang Message-ID: Date: Fri, 13 Mar 2020 17:03:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20200313082451.GA20331@infradead.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9DxL2hUTGteYx4aAA--.10S3 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYJ7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E 6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28Cjx kF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8I cVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2js IEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE 5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r4j6F4UMcvjeV CFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxG xcIEc7CjxVA2Y2ka0xkIwI1lc7I2V7IY0VAS07AlzVAYIcxG8wCY02Avz4vE14v_GFWl42 xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWU GwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI4 8JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4U MIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42 IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfU8KZXUUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/13/2020 04:24 PM, Christoph Hellwig wrote: > On Mon, Mar 09, 2020 at 04:23:24PM +0800, Tiezhu Yang wrote: >> Implement __phys_to_dma() and __dma_to_phys() according to the >> node id offset in 7A1000 DMA route config register. > Can you just switch Loongson over to use the dma_pfn_offset field in > struct device? I'd love to kill the __phys_to_dma and __dma_to_phys > hooks wherever possible. Hi Christoph, Thanks for your suggestion, I will refactor the code. Thanks, Tiezhu Yang