LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nipun Gupta <nipun.gupta@nxp.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: "robin.murphy@arm.com" <robin.murphy@arm.com>,
"hch@lst.de" <hch@lst.de>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"zajec5@gmail.com" <zajec5@gmail.com>,
"andy.gross@linaro.org" <andy.gross@linaro.org>,
"david.brown@linaro.org" <david.brown@linaro.org>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"vinod.koul@intel.com" <vinod.koul@intel.com>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"frowand.list@gmail.com" <frowand.list@gmail.com>,
"jarkko.sakkinen@linux.intel.com"
<jarkko.sakkinen@linux.intel.com>,
"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
"johan@kernel.org" <johan@kernel.org>,
"msuchanek@suse.de" <msuchanek@suse.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-soc@vger.kernel.org" <linux-soc@vger.kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Bharat Bhushan <bharat.bhushan@nxp.com>,
Leo Li <leoyang.li@nxp.com>
Subject: RE: [PATCH v2 2/2] drivers: remove force dma flag from buses
Date: Wed, 21 Mar 2018 16:28:46 +0000 [thread overview]
Message-ID: <HE1PR0401MB2425644F72A063ED42B79D5FE6AA0@HE1PR0401MB2425.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20180321093525.GT14085@kroah.com>
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, March 21, 2018 15:05
> To: Nipun Gupta <nipun.gupta@nxp.com>
> Cc: robin.murphy@arm.com; hch@lst.de; linux@armlinux.org.uk;
> 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
> <bharat.bhushan@nxp.com>; Leo Li <leoyang.li@nxp.com>
> Subject: Re: [PATCH v2 2/2] drivers: remove force dma flag from buses
>
> On Wed, Mar 21, 2018 at 12:25:23PM +0530, Nipun Gupta wrote:
> > With each bus implementing its own DMA configuration callback,
> > there is no need for bus to explicitly have force_dma in its
> > global structure. This patch modifies of_dma_configure API to
> > accept an input parameter which specifies if implicit DMA
> > configuration is required even when it is not described by the
> > firmware.
>
> Having to "remember" what that bool variable means on the end of the
> function call is a royal pain over time, right?
>
> Why not just create a new function:
> dma_common_configure_force(dma)
> that always does this? Leave "dma_common_configure()" alone, and then
> wrap the old code with these two helper functions that call the 'core'
> code with the bool set properly?
>
> That way you do not have to "know" what that parameter is, the function
> name just documents it automatically, so when you see it in the
> bus-specific code, no need to go and have to hunt for anything. And if
> you are reading the dma core code, it's obvious what is happening as the
> functions are all right there.
How about we do not pass any flag in 'dma_common_configure()', and inside this
API we pass "true" to 'of_dma_configure()'? I am saying this because currently
both the busses (platform and AMBA) which uses 'dma_common_configure()' passes
"true" value. If we create additional 'dma_common_configure_force()', then
'dma_common_configure()' will not be used anytime and will become redundant.
If someday new busses come and they needs to use similar functionality which
'dma_common_configure()' provides, but with passing "false" to 'of_dma_configure()',
then what you suggests of having two separate such API's will be more reasonable
and can be implemented?
Thanks,
Nipun
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2018-03-21 16:28 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 15:24 [PATCH] dma-mapping: move dma configuration to bus infrastructure Nipun Gupta
2018-03-12 16:44 ` Sinan Kaya
2018-03-13 4:22 ` Nipun Gupta
2018-03-13 7:27 ` hch
2018-03-13 7:34 ` Christoph Hellwig
2018-03-13 15:59 ` Nipun Gupta
2018-03-14 9:03 ` Christoph Hellwig
2018-03-13 11:35 ` Robin Murphy
2018-03-13 16:11 ` Nipun Gupta
2018-03-14 9:02 ` Christoph Hellwig
2018-03-13 21:53 ` kbuild test robot
2018-03-13 21:53 ` [RFC PATCH] dma-mapping: platform_dma_configure() can be static kbuild test robot
2018-03-14 5:48 ` [dma] 9a019f4251: BUG:unable_to_handle_kernel kernel test robot
2018-03-21 6:55 ` [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure Nipun Gupta
2018-03-21 6:55 ` [PATCH v2 2/2] drivers: remove force dma flag from buses Nipun Gupta
2018-03-21 9:35 ` Greg KH
2018-03-21 16:28 ` Nipun Gupta [this message]
2018-03-21 17:49 ` Greg KH
2018-03-22 8:19 ` Christoph Hellwig
2018-03-22 15:13 ` Nipun Gupta
2018-03-23 16:09 ` kbuild test robot
2018-03-23 17:41 ` kbuild test robot
2018-03-21 7:19 ` [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure Bharat Bhushan
2018-03-21 7:29 ` Nipun Gupta
2018-03-22 8:17 ` hch
2018-03-21 9:29 ` Greg KH
2018-03-21 16:13 ` Nipun Gupta
2018-03-22 8:15 ` Christoph Hellwig
2018-03-22 15:05 ` Nipun Gupta
2018-03-24 9:25 ` kbuild test robot
2018-03-30 7:15 ` [PATCH] " Christoph Hellwig
2018-03-30 7:17 ` Nipun Gupta
2018-03-30 9:05 ` Greg KH
2018-03-30 7:54 ` [PATCH v3 1/2] " Nipun Gupta
2018-03-30 7:54 ` [PATCH v3 2/2] drivers: remove force dma flag from buses Nipun Gupta
2018-04-09 20:27 ` Rob Herring
2018-04-10 19:21 ` Bjorn Helgaas
2018-04-10 19:20 ` [PATCH v3 1/2] dma-mapping: move dma configuration to bus infrastructure Bjorn Helgaas
2018-04-23 12:56 ` Christoph Hellwig
2018-04-23 12:56 ` Christoph Hellwig
2018-04-27 17:10 ` Nipun Gupta
2018-04-28 2:51 ` [PATCH v4 " Nipun Gupta
2018-04-28 2:51 ` [PATCH v4 2/2] drivers: remove force dma flag from buses Nipun Gupta
2018-05-01 12:34 ` Rob Herring
2018-05-03 16:36 ` Vinod Koul
2018-04-30 10:41 ` [PATCH v4 1/2] dma-mapping: move dma configuration to bus infrastructure Thierry Reding
2018-05-03 12:21 ` Christoph Hellwig
2018-05-03 12:21 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=HE1PR0401MB2425644F72A063ED42B79D5FE6AA0@HE1PR0401MB2425.eurprd04.prod.outlook.com \
--to=nipun.gupta@nxp.com \
--cc=andy.gross@linaro.org \
--cc=bharat.bhushan@nxp.com \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=david.brown@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=johan@kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=msuchanek@suse.de \
--cc=rafael.j.wysocki@intel.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=thierry.reding@gmail.com \
--cc=vinod.koul@intel.com \
--cc=zajec5@gmail.com \
--subject='RE: [PATCH v2 2/2] drivers: remove force dma flag from buses' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).