Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1457711ybh; Fri, 13 Mar 2020 01:26:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtGLde2L6zOvl4DqBUq0lsG/MnntIK0eHjMUvpEp9ilG648OV0XLKi0fJPwdaBxnTqLCPbN X-Received: by 2002:aca:ecd0:: with SMTP id k199mr6078345oih.60.1584087963702; Fri, 13 Mar 2020 01:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584087963; cv=none; d=google.com; s=arc-20160816; b=brqlxlHIxE2UUSvNic8VkSYtWocfTlJMG++137AHujKjMWErxOC5TD3nILbGgxKHko cVn7asrbPSDhmPns/F00UnacEv9S0J908e0PqDZ6eGjz4xMLOqKSZS3HbzfmZev9Hbvy p5b891/F+kCWX8GuWPffvO1qe04coAPODjvmcCNGYIs7EXLN1dJ5DlWR8w9D1ikVLy3l Ae9s+WGYc7cNuSSOM1MqsFIR5RMFw6gaZbez4AvQrjTUnNI0kHf5yCbqQfROPGAzcjkN 25jXTxickN04YIewTueWWAea37afoejS0Tl4sa/ylQVGtsjFEgGF0ncxCj4vAaIzHPzu AcMg== 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=/ZdDlbLqNOvakJ4NWfeKFrm2xJH0FxuVXIiomBTeWY0=; b=U2Vxe2efc/7dSfpovAhwyI1eLWqtE1LrrvbemWYGmZyc2KWZ8LigBBIYE4ok2Bu0FS zcrmkMbOJXujNE0mqaZl3draUq0vYOG7THiDIBrI1VbVOr0qY50VGOqS2walDIrPNWyR 7OHGE52Bv1FmAzgoPMNT4U3/oTQlHJZajImAeh667sYZGjafvkpi3VFaj2sRV3ntjiPX PqGuKI6SvTtwqFJjEjCHs5+rlShrjfGKkrSNlxBWCFRsIsrTZnPLkH0uhyF36kVYcVdR K6RmQQztacleAL+fiycvmqXc/X9O1a3Ho/bKd33snhLs0kcGA0O2Yh19CCbviiHGsCCw 5bsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=h0nC3b0l; 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 d62si3889907oib.137.2020.03.13.01.25.51; Fri, 13 Mar 2020 01:26:03 -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=h0nC3b0l; 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 S1726553AbgCMIZP (ORCPT + 99 others); Fri, 13 Mar 2020 04:25:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34010 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbgCMIZO (ORCPT ); Fri, 13 Mar 2020 04:25:14 -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=/ZdDlbLqNOvakJ4NWfeKFrm2xJH0FxuVXIiomBTeWY0=; b=h0nC3b0lys4AAFlklVuzX011mM aHVnRucRLsffajpU6AVN5ImOUq9DYUQk/8gBFO80Sg/fTAjqTJ0XiqmWvPve7tuqVDjJEqyAmYuUZ bqQ/GWEiKM8bO0yKpKacYY2OQJClYNWda3Wf4EyMniDg4/SLt23w5bwyeHZu2x52xijyMGx23TdqG T83ispvqZvSbDr2cgRfJPZ4jpDnloh/lNDY7Vdho5o+etQWEpjKmccgwP0uzeCdHBOnDLLv68D5vd B6GTSlbxQfeBfIwAJxva6gGs6+dJtEAhcXMLMzVmW7AQktEp5K2Clsb0pU1yj3qpp0rNK3viZRG0l WR2idzGg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCfch-0005OI-Ce; Fri, 13 Mar 2020 08:24:51 +0000 Date: Fri, 13 Mar 2020 01:24:51 -0700 From: Christoph Hellwig To: Tiezhu Yang 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 Subject: Re: [PATCH 4/6] MIPS: Loongson: Add DMA support for 7A1000 Message-ID: <20200313082451.GA20331@infradead.org> References: <1583742206-29163-1-git-send-email-yangtiezhu@loongson.cn> <1583742206-29163-5-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1583742206-29163-5-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 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.