summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSri Krishna chowdary <schowdary@nvidia.com>2015-05-12 03:12:49 -0400
committerSri Krishna Chowdary <schowdary@nvidia.com>2016-01-27 04:05:47 -0500
commit453090b8fb9e886e8cbb11e99d78caabf96877a3 (patch)
treed6488380e46f7e7da56ea4787264391f563c1ccf /include
parent600ca656507bfceaa4b94de6cb6160f1f5404241 (diff)
video: tegra: nvmap: support inserting pages on unreserve
Some times it is beneficial to insert pages into vma on unreserve. This avoids page fault overhead for any accesses later. If user space knows apriori which regions of a group of handles will be accessed for sure, user space can pass relevant information with this new NVMAP_INSERT_PAGE_ON_UNRESERVE option to reserve ioctl call. Mark pages as writable, else write accesses after read fault nullifying the purpose of the option. Bug 200092803 Change-Id: Id44502b9a5d890d24f221e38c6ae781584ce7ace Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com> Reviewed-on: http://git-master/r/781602 (cherry picked from commit ce62f04082dc1adfe07c1bcd8cbff0d59b3abf80) Reviewed-on: http://git-master/r/843463 Reviewed-on: http://git-master/r/840161 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nvmap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h
index c661d1334..68d8ab529 100644
--- a/include/linux/nvmap.h
+++ b/include/linux/nvmap.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * structure declarations for nvmem and nvmap user-space ioctls 4 * structure declarations for nvmem and nvmap user-space ioctls
5 * 5 *
6 * Copyright (c) 2009-2015, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2009-2016, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -123,7 +123,8 @@ enum {
123 123
124enum { 124enum {
125 NVMAP_PAGES_UNRESERVE = 0, 125 NVMAP_PAGES_UNRESERVE = 0,
126 NVMAP_PAGES_RESERVE 126 NVMAP_PAGES_RESERVE,
127 NVMAP_INSERT_PAGES_ON_UNRESERVE
127}; 128};
128 129
129struct nvmap_create_handle { 130struct nvmap_create_handle {