AOSP pmem

file:018135179239485061ab2a2fe4fea0c3df1aadc5 -> file:3948cd72478a5ab88baecd0739887f409c835df0
--- a/drivers/misc/pmem.c
+++ b/drivers/misc/pmem.c
@@ -1200,6 +1200,16 @@ static long pmem_ioctl(struct file *file
return pmem_connect(arg, file);
break;
+ case PMEM_CACHE_FLUSH:
+ {
+ struct pmem_region region;
+ if (copy_from_user(&region, (void __user *)arg,
+ sizeof(struct pmem_region)))
+ return -EFAULT;
+ flush_pmem_file(file, region.offset, region.len);
+ break;
+ }
+
case PMEM_CLEAN_INV_CACHES:
case PMEM_CLEAN_CACHES:
case PMEM_INV_CACHES:
file:c7903ed5b40973d3ae6d1bbdd0643ac532d90665 -> file:aa0b013c156b005c6a6e9233eea2bc6d4844ff03
--- a/include/linux/android_pmem.h
+++ b/include/linux/android_pmem.h
@@ -67,6 +67,7 @@
#define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
#define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int)
+#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
#define PMEM_CLEAN_INV_CACHES _IOW(PMEM_IOCTL_MAGIC, 11, unsigned int)
#define PMEM_CLEAN_CACHES _IOW(PMEM_IOCTL_MAGIC, 12, unsigned int)
#define PMEM_INV_CACHES _IOW(PMEM_IOCTL_MAGIC, 13, unsigned int)