From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr10088.outbound.protection.outlook.com ([40.107.1.88]:15291 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753181AbeCVPNz (ORCPT ); Thu, 22 Mar 2018 11:13:55 -0400 From: Nipun Gupta To: Christoph Hellwig CC: "robin.murphy@arm.com" , "linux@armlinux.org.uk" , "gregkh@linuxfoundation.org" , "m.szyprowski@samsung.com" , "bhelgaas@google.com" , "zajec5@gmail.com" , "andy.gross@linaro.org" , "david.brown@linaro.org" , "dan.j.williams@intel.com" , "vinod.koul@intel.com" , "thierry.reding@gmail.com" , "robh+dt@kernel.org" , "frowand.list@gmail.com" , "jarkko.sakkinen@linux.intel.com" , "rafael.j.wysocki@intel.com" , "dmitry.torokhov@gmail.com" , "johan@kernel.org" , "msuchanek@suse.de" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-wireless@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , "linux-soc@vger.kernel.org" , "dmaengine@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-tegra@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-pci@vger.kernel.org" , Bharat Bhushan , Leo Li Subject: RE: [PATCH v2 2/2] drivers: remove force dma flag from buses Date: Thu, 22 Mar 2018 15:13:49 +0000 Message-ID: References: <1520868292-2479-1-git-send-email-nipun.gupta@nxp.com> <1521615323-4752-1-git-send-email-nipun.gupta@nxp.com> <1521615323-4752-2-git-send-email-nipun.gupta@nxp.com> <20180322081926.GC29444@lst.de> In-Reply-To: <20180322081926.GC29444@lst.de> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org List-ID: > -----Original Message----- > From: Christoph Hellwig [mailto:hch@lst.de] > Sent: Thursday, March 22, 2018 13:49 > To: Nipun Gupta >=20 > > --- a/drivers/dma/qcom/hidma_mgmt.c > > +++ b/drivers/dma/qcom/hidma_mgmt.c > > @@ -398,7 +398,7 @@ static int __init > hidma_mgmt_of_populate_channels(struct device_node *np) > > } > > of_node_get(child); > > new_pdev->dev.of_node =3D child; > > - of_dma_configure(&new_pdev->dev, child); > > + of_dma_configure(&new_pdev->dev, child, true); > > /* > > * It is assumed that calling of_msi_configure is safe on > > * platforms with or without MSI support. >=20 > Where did we mark this bus as force_dma before? I thought these devices to be on the platform bus as the device is of type 'struct platform_device', though I am not sure then why 'of_dma_configure()= ' is called here. Is this not on platform bus? >=20 > > diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.= c > > index 9a4f4246..895c83e 100644 > > --- a/drivers/of/of_reserved_mem.c > > +++ b/drivers/of/of_reserved_mem.c > > @@ -353,7 +353,7 @@ int of_reserved_mem_device_init_by_idx(struct devic= e > *dev, > > /* ensure that dma_ops is set for virtual devices > > * using reserved memory > > */ > > - of_dma_configure(dev, np); > > + of_dma_configure(dev, np, true); >=20 > Did all the callers of this one really force dma? I have a hard time > untangling the call stacks unfortunately. I see this API being called indirectly from NXP DPAA device driver which is for platform bus devices. So I marked 'true' out here. There are more pl= aces from where it is being called. Thanks, Nipun