From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Hiroshi Doyu <hdoyu@nvidia.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Inki Dae <inki.dae@samsung.com>, Arnd Bergmann <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-tegra@vger.kernel.org
Subject: Re: [Linaro-mm-sig] [RFC 0/2] DMA-mapping & IOMMU - physically contiguous allocations
Date: Tue, 16 Oct 2012 09:59:28 +0100 [thread overview]
Message-ID: <20121016085928.GV21164@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20121016090434.7d5e088152a3e0b0606903c8@nvidia.com>
On Tue, Oct 16, 2012 at 09:04:34AM +0300, Hiroshi Doyu wrote:
> In addition to those contiguous/discontiguous page allocation, is
> there any way to _import_ anonymous pages allocated by a process to be
> used in dma-mapping API later?
>
> I'm considering the following scenario, an user process allocates a
> buffer by malloc() in advance, and then it asks some driver to convert
> that buffer into IOMMU'able/DMA'able ones later. In this case, pages
> are discouguous and even they may not be yet allocated at
> malloc()/mmap().
That situation is covered. It's the streaming API you're wanting for that.
dma_map_sg() - but you may need additional cache handling via
flush_dcache_page() to ensure that your code is safe for all CPU cache
architectures.
Remember that pages allocated into userspace will be cacheable, so a cache
flush is required before they can be DMA'd. Hence the streaming API.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-10-16 8:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 14:03 Marek Szyprowski
2012-10-15 14:03 ` [RFC 1/2] common: DMA-mapping: add DMA_ATTR_FORCE_CONTIGUOUS attribute Marek Szyprowski
2012-10-15 14:03 ` [RFC 2/2] ARM: dma-mapping: add support for " Marek Szyprowski
2012-10-16 0:50 ` [RFC 0/2] DMA-mapping & IOMMU - physically contiguous allocations Inki Dae
2012-10-16 6:04 ` [Linaro-mm-sig] " Hiroshi Doyu
2012-10-16 8:59 ` Russell King - ARM Linux [this message]
2012-10-16 10:04 ` Catalin Marinas
2012-10-16 10:27 ` Hiroshi Doyu
2012-10-16 10:37 ` Russell King - ARM Linux
2012-10-16 10:12 ` Inki Dae
2012-10-16 10:31 ` Russell King - ARM Linux
2012-10-16 11:11 ` Inki Dae
2012-10-16 14:13 ` Hiroshi Doyu
2012-10-16 22:54 ` Inki Dae
2012-10-16 9:30 ` Daniel Vetter
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=20121016085928.GV21164@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=arnd@arndb.de \
--cc=hdoyu@nvidia.com \
--cc=inki.dae@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-tegra@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/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