Thread (39 messages) 39 messages, 6 authors, 2012-03-30

[PATCHv7 9/9] ARM: dma-mapping: add support for IOMMU mapper

From: vdumpa@nvidia.com (Krishna Reddy)
Date: 2012-03-06 23:36:53
Also in: linux-arch, linux-iommu, linux-mm, linux-samsung-soc

On Wed, Feb 29, 2012 at 04:04:22PM +0100, Marek Szyprowski wrote:
quoted
+static int arm_iommu_mmap_attrs(struct device *dev, struct
vm_area_struct *vma,
quoted
+		    void *cpu_addr, dma_addr_t dma_addr, size_t size,
+		    struct dma_attrs *attrs)
+{
+	struct arm_vmregion *c;
+
+	vma->vm_page_prot = __get_dma_pgprot(attrs, vma-
vm_page_prot);
+	c = arm_vmregion_find(&consistent_head, (unsigned
long)cpu_addr);

What protects this against other insertions/removals from the list?
arm_vmregion_find uses a spin_lock internally before accessing consistent_head.
 So, it is protected.


-KR

--nvpublic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help