* [Linaro-mm-sig] [PATCH 0/3] [RFC] Kernel Virtual Memory allocation issue in dma-mapping framework
[not found] <CALYq+qRFF-7p0P2+zG=4=s5+-D4pyB6G2wBCpuonoFRJ6FLo1Q@mail.gmail.com>
@ 2012-05-11 2:01 ` Abhinav Kochhar
0 siblings, 0 replies; only message in thread
From: Abhinav Kochhar @ 2012-05-11 2:01 UTC (permalink / raw)
To: Marek Szyprowski; +Cc: linux-arm-kernel, linaro-mm-sig, linux-mm, Kyungmin Park
[-- Attachment #1: Type: text/plain, Size: 2301 bytes --]
Hello,
This is a request for comments on dma-mapping patches for ARM. I
did some additions for issue related to kernel virtual memory allocations
in the iommu ops defined in dma-mapping framework.
The patches are based on:
git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git3.4-rc3-arm-dma-v9
The code has been tested on Samsung Exynos5 SMDK5250.
These patches do the following:
1. Define a new dma attribute to identify user space allocation.
2. Add new wrapper functions to pass the dma attribute defined in (1)
above, as in the current framework there is no way to pass the new
attribute which can be used to differentiate between kernel and user
allocations.
3. Extend the existing arm_dma_ops for iommu enabled devices to
differentiate between kernel and user space allocations.
Patch summary:
[PATCH 1/3]:
Common: add DMA_ATTR_USER_SPACE to dma-attr. This can be passed to
arm_dma_ops to identify the type of allocation which can be either from
kernel or from user.
[PATCH 2/3]:
ARM: add "struct page_infodma" to hold information for allocated pages.
This can be attached to any of the devices which is making use of
dma-mapping APIs. Any interested device should allocate this structure and
store all the relevant information about the allocated pages to be able to
do a look up for all future references.
ARM: add dma_alloc_writecombine_user() function to pass DMA_ATTR_USER_SPACE
attribute
ARM: add dma_free_writecombine_user() function to pass DMA_ATTR_USER_SPACE
attribute
ARM: add dma_mmap_writecombine_user() function to pass DMA_ATTR_USER_SPACE
attribute
[PATCH 3/3]:
ARM: add check for allocation type in __dma_alloc_remap() function
ARM: add check for allocation type in arm_iommu_alloc_attrs() function
ARM: add check for allocation type in arm_iommu_mmap_attrs() function
ARM: re-used dma_addr as a flag to check for memory allocation type. It was
an unused argument and the prototype does not pass dma-attrs, so used this
as a means to pass the flag.
ARM: add check for allocation type in arm_iommu_free_attrs() function
arch/arm/include/asm/dma-mapping.h | 31 +++++++
arch/arm/mm/dma-mapping.c | 168
++++++++++++++++++++++++++----------
include/linux/dma-attrs.h | 1 +
3 files changed, 155 insertions(+), 45 deletions(-)
[-- Attachment #2: Type: text/html, Size: 2588 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-11 2:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CALYq+qRFF-7p0P2+zG=4=s5+-D4pyB6G2wBCpuonoFRJ6FLo1Q@mail.gmail.com>
2012-05-11 2:01 ` [Linaro-mm-sig] [PATCH 0/3] [RFC] Kernel Virtual Memory allocation issue in dma-mapping framework Abhinav Kochhar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox