summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-10-16 08:15:11 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:46 -0400
commit2eb6dcb4694c8b83e22c50d9fd4d3fdd85b93c46 (patch)
tree0a2d10c9873b81fd6a6821959874d4345cc6bfad /include
parentecc6f27fd13e7560d124faf67d114b93d47b73de (diff)
gpu: nvgpu: Implement 64k large page support
Implement support for 64kB large page size. Add an API to create an address space via IOCTL so that we can accept flags, and assign one flag for enabling 64kB large page size. Also adds APIs to set per-context large page size. This is possible only on Maxwell, so return error if caller tries to set large page size on Kepler. Default large page size is still 128kB. Change-Id: I20b51c8f6d4a984acae8411ace3de9000c78e82f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index 694c497c..c9e50b36 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -175,6 +175,12 @@ struct nvgpu_gpu_mark_compressible_write_args {
175 __u32 reserved[3]; /* must be zero */ 175 __u32 reserved[3]; /* must be zero */
176}; 176};
177 177
178struct nvgpu_alloc_as_args {
179 __u32 big_page_size;
180 __s32 as_fd;
181 __u64 reserved; /* must be zero */
182};
183
178#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ 184#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \
179 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) 185 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args)
180#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ 186#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \
@@ -189,9 +195,11 @@ struct nvgpu_gpu_mark_compressible_write_args {
189 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 6, struct nvgpu_gpu_prepare_compressible_read_args) 195 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 6, struct nvgpu_gpu_prepare_compressible_read_args)
190#define NVGPU_GPU_IOCTL_MARK_COMPRESSIBLE_WRITE \ 196#define NVGPU_GPU_IOCTL_MARK_COMPRESSIBLE_WRITE \
191 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 7, struct nvgpu_gpu_mark_compressible_write_args) 197 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 7, struct nvgpu_gpu_mark_compressible_write_args)
198#define NVGPU_GPU_IOCTL_ALLOC_AS \
199 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 8, struct nvgpu_alloc_as_args)
192 200
193#define NVGPU_GPU_IOCTL_LAST \ 201#define NVGPU_GPU_IOCTL_LAST \
194 _IOC_NR(NVGPU_GPU_IOCTL_MARK_COMPRESSIBLE_WRITE) 202 _IOC_NR(NVGPU_GPU_IOCTL_ALLOC_AS)
195#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ 203#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \
196 sizeof(struct nvgpu_gpu_prepare_compressible_read_args) 204 sizeof(struct nvgpu_gpu_prepare_compressible_read_args)
197 205