summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-10-13 12:03:32 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-14 10:52:25 -0400
commitc7e0c7e7ce045a9bef53f3fa11377ddb23bd79a3 (patch)
tree85fac47e36e2958ab44dc2f79023bca9fe31a6ea /drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
parent6bf323f3894bdcb95461cdf0f834cbef06e9e5d6 (diff)
gpu: nvgpu: Move time correlation arg check to Linux
Move code checking the time correlation IOCTL arguments to Linux IOCTL code. JIRA NVGPU-259 Change-Id: Id3ef6839ee96844104d87e943b6940b952261796 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1578700 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
index 30988462..88c8debf 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
@@ -558,7 +558,8 @@ static int nvgpu_gpu_get_cpu_time_correlation_info(
558 int err; 558 int err;
559 u32 i; 559 u32 i;
560 560
561 if (args->count > NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_MAX_COUNT) 561 if (args->count > NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_MAX_COUNT ||
562 args->source_id != NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_TSC)
562 return -EINVAL; 563 return -EINVAL;
563 564
564 samples = nvgpu_kzalloc(g, args->count * 565 samples = nvgpu_kzalloc(g, args->count *