From: Eli Billauer <eli.billauer@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Joerg Roedel <joro@8bytes.org>,
devel@driverdev.osuosl.org, Shuah Khan <shuah.kh@samsung.com>,
discuss@x86-64.org, linux-kernel@vger.kernel.org,
bhelgaas@google.com, iommu@lists.linux-foundation.org,
linux-pci@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()
Date: Fri, 06 Jun 2014 19:21:38 +0300 [thread overview]
Message-ID: <5391EA92.9050306@gmail.com> (raw)
In-Reply-To: <20140606160103.GG15110@kroah.com>
On 06/06/14 19:01, Greg KH wrote:
>> Please try to put yourself in my position: I have a driver that I care
>> > about, which works fine for a few years. It's based upon dma_map_single(),
>> > which seems to be the common way to get non-coherent memory, even for the
>> > driver's entire lifespan. I realize that dma_alloc_* was the intended way to
>> > do it, but fact is that dma_map_* has become the common choice.
>>
> Is your driver in the kernel tree? If not, you really are on your own :(
>
It's the Xillybus driver in the staging area. I don't know if this
counts for being in the kernel tree...
The suggested patchset would allow replacing my use of dma_map_single()
with a managed version of that function. This will clean the driver's
code considerably.
But I think that the discussion here is if it's valid to use
dma_map_single() for a device-permanent DMA mapping, or if
dma_alloc_noncoherent() is the only way. If the answer is no, there's
quite obviously no point in a devres version for that function.
Regards,
Eli
> greg k-h
>
>
next prev parent reply other threads:[~2014-06-06 16:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 7:01 [PATCH v2 0/4] devres: dma-mapping: Introducing new functions Eli Billauer
2014-06-01 7:01 ` [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single() Eli Billauer
2014-06-03 21:24 ` Shuah Khan
2014-06-03 23:39 ` Joerg Roedel
2014-06-04 14:04 ` Tejun Heo
2014-06-04 14:12 ` Joerg Roedel
2014-06-04 14:14 ` Tejun Heo
2014-06-04 15:03 ` Eli Billauer
2014-06-04 21:25 ` Joerg Roedel
2014-06-06 11:45 ` Eli Billauer
2014-06-06 16:01 ` Greg KH
2014-06-06 16:21 ` Eli Billauer [this message]
2014-06-06 17:02 ` Shuah Khan
2014-06-07 11:23 ` Eli Billauer
2014-06-01 7:01 ` [PATCH v2 2/4] dma-mapping: Add devm_ interface for dma_map_single_attrs() Eli Billauer
2014-06-01 7:01 ` [PATCH v2 3/4] dma-mapping: pci: Add devm_ interface for pci_map_single Eli Billauer
2014-06-01 7:01 ` [PATCH v2 4/4] staging: xillybus: Use devm_ API for memory allocation and DMA mapping Eli Billauer
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=5391EA92.9050306@gmail.com \
--to=eli.billauer@gmail.com \
--cc=bhelgaas@google.com \
--cc=devel@driverdev.osuosl.org \
--cc=discuss@x86-64.org \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=shuah.kh@samsung.com \
--cc=tj@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).