Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3a94e137 authored by Andreas Herrmann's avatar Andreas Herrmann Committed by Mitchel Humpherys
Browse files

ARM: dma-mapping: Always pass proper prot flags to iommu_map()



... otherwise it is impossible for the low level iommu driver to
figure out which pte flags should be used.

In __map_sg_chunk we can derive the flags from dma_data_direction.

In __iommu_create_mapping we should treat the memory like
DMA_BIDIRECTIONAL and pass both IOMMU_READ and IOMMU_WRITE to
iommu_map.
__iommu_create_mapping is used during dma_alloc_coherent (via
arm_iommu_alloc_attrs).  AFAIK dma_alloc_coherent is responsible for
allocation _and_ mapping.  I think this implies that access to the
mapped pages should be allowed.

Change-Id: Ib65ae5284d84f3552c620c466d10ecd51a6933b7
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarAndreas Herrmann <andreas.herrmann@calxeda.com>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Git-commit: c9b24996d5da1bf7d2bebab5770dfcc7834c53b7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git


Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 49308a7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment