mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
pmem: Add cache flush ioctl for pmem buffers
Change-Id: I9156bad829e8c65087f122b48cc57638902fab12 Signed-off-by: Dima Zavin <dima@android.com>
This commit is contained in:
@@ -1148,6 +1148,16 @@ static long pmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
DLOG("connect\n");
|
||||
return pmem_connect(arg, file);
|
||||
break;
|
||||
case PMEM_CACHE_FLUSH:
|
||||
{
|
||||
struct pmem_region region;
|
||||
DLOG("flush\n");
|
||||
if (copy_from_user(®ion, (void __user *)arg,
|
||||
sizeof(struct pmem_region)))
|
||||
return -EFAULT;
|
||||
flush_pmem_file(file, region.offset, region.len);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (pmem[id].ioctl)
|
||||
return pmem[id].ioctl(file, cmd, arg);
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
* struct (with offset set to 0).
|
||||
*/
|
||||
#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int)
|
||||
#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
|
||||
|
||||
struct android_pmem_platform_data
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user