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

Commit fa92140f authored by Rajesh Kemisetti's avatar Rajesh Kemisetti Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Change device-type memory mapping to Normal-NC



Device type memory mapping enforces certain restrictions
on unaligned address accesses.

If userspace in an IOCTL incorrectly sends an unaligned
address at the boundary of device type memory mapping to
kernel, there will be a fault because kernel goes ahead
and reads the device type memory with unaligned access.

To overcome such issues, change device-type memory mapping
to Normal-noncached wherever it is possible.

Change-Id: I34e8268a0defe335ca9d360e910655c2891cd572
Signed-off-by: default avatarRajesh Kemisetti <rajeshk@codeaurora.org>
parent 166af733
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3837,7 +3837,7 @@ kgsl_mmap_memstore(struct kgsl_device *device, struct vm_area_struct *vma)
		return -EINVAL;
	}

	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);

	result = remap_pfn_range(vma, vma->vm_start,
				device->memstore.physaddr >> PAGE_SHIFT,