gpu: nvgpu: linux: Disable diversity related support

SM and CE diversities are safety only features.
Hence, we do not require to expose their ioctl and diversity
related flags for Linux.

JIRA NVGPU-4133
Bug 2776580

Change-Id: Icc3cc04734ffdcd901222206fca9a3594340d0e1
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2258872
Reviewed-by: Shashank Singh <shashsingh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Lakshmanan M
2019-12-10 10:11:11 +05:30
committed by Alex Waterman
parent 80f408632a
commit d0bc8237e3
3 changed files with 2 additions and 32 deletions

View File

@@ -1133,16 +1133,6 @@ long gk20a_channel_ioctl(struct file *filp,
struct nvgpu_alloc_obj_ctx_args *args = struct nvgpu_alloc_obj_ctx_args *args =
(struct nvgpu_alloc_obj_ctx_args *)buf; (struct nvgpu_alloc_obj_ctx_args *)buf;
if (nvgpu_is_enabled(ch->g, NVGPU_SUPPORT_SM_DIVERSITY)) {
if (args->sm_diversity_config >=
ch->g->max_sm_diversity_config_count) {
err = -EINVAL;
break;
}
} else {
args->sm_diversity_config = 0U;
}
err = gk20a_busy(ch->g); err = gk20a_busy(ch->g);
if (err) { if (err) {
dev_err(dev, dev_err(dev,

View File

@@ -248,11 +248,7 @@ static struct nvgpu_flags_mapping flags_mapping[] = {
{NVGPU_GPU_FLAGS_SUPPORT_SET_CTX_MMU_DEBUG_MODE, {NVGPU_GPU_FLAGS_SUPPORT_SET_CTX_MMU_DEBUG_MODE,
NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE}, NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE},
{NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY, {NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY,
NVGPU_SUPPORT_FAULT_RECOVERY}, NVGPU_SUPPORT_FAULT_RECOVERY}
{NVGPU_GPU_FLAGS_SUPPORT_COPY_ENGINE_DIVERSITY,
NVGPU_SUPPORT_COPY_ENGINE_DIVERSITY},
{NVGPU_GPU_FLAGS_SUPPORT_SM_DIVERSITY,
NVGPU_SUPPORT_SM_DIVERSITY}
}; };
static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g) static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g)
@@ -323,8 +319,6 @@ gk20a_ctrl_ioctl_gpu_characteristics(
gpu.num_tpc_per_gpc = nvgpu_gr_config_get_max_tpc_per_gpc_count(gr_config); gpu.num_tpc_per_gpc = nvgpu_gr_config_get_max_tpc_per_gpc_count(gr_config);
gpu.max_sm_diversity_config_count = g->max_sm_diversity_config_count;
gpu.bus_type = NVGPU_GPU_BUS_TYPE_AXI; /* always AXI for now */ gpu.bus_type = NVGPU_GPU_BUS_TYPE_AXI; /* always AXI for now */
gpu.compression_page_size = g->ops.fb.compression_page_size(g); gpu.compression_page_size = g->ops.fb.compression_page_size(g);
@@ -853,15 +847,6 @@ static int gk20a_ctrl_vsm_mapping(struct gk20a *g,
struct nvgpu_gr_config *gr_config = nvgpu_gr_get_config_ptr(g); struct nvgpu_gr_config *gr_config = nvgpu_gr_get_config_ptr(g);
u32 i; u32 i;
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_SM_DIVERSITY)) {
if (args->sm_diversity_config >=
g->max_sm_diversity_config_count) {
return -EINVAL;
}
} else {
args->sm_diversity_config = 0U;
}
vsms_buf = nvgpu_kzalloc(g, write_size); vsms_buf = nvgpu_kzalloc(g, write_size);
if (vsms_buf == NULL) if (vsms_buf == NULL)
return -ENOMEM; return -ENOMEM;

View File

@@ -294,8 +294,7 @@ struct nvgpu_gpu_characteristics {
__u8 reserved2[6]; __u8 reserved2[6];
__u32 max_ctxsw_ring_buffer_size; __u32 max_ctxsw_ring_buffer_size;
/* Max CTA diversity configuration count. */ __u32 reserved3;
__u32 max_sm_diversity_config_count;
/* Notes: /* Notes:
- This struct can be safely appended with new fields. However, always - This struct can be safely appended with new fields. However, always
@@ -460,8 +459,6 @@ struct nvgpu_gpu_vsms_mapping_entry {
}; };
struct nvgpu_gpu_vsms_mapping { struct nvgpu_gpu_vsms_mapping {
__u32 sm_diversity_config;
__u32 reserved;
__u64 vsms_map_buf_addr; __u64 vsms_map_buf_addr;
}; };
@@ -1524,8 +1521,6 @@ struct nvgpu_set_nvmap_fd_args {
struct nvgpu_alloc_obj_ctx_args { struct nvgpu_alloc_obj_ctx_args {
__u32 class_num; /* kepler3d, 2d, compute, etc */ __u32 class_num; /* kepler3d, 2d, compute, etc */
__u32 flags; /* input, output */ __u32 flags; /* input, output */
__u32 sm_diversity_config; /* input */
__u32 reserved;
__u64 obj_id; /* output, used to free later */ __u64 obj_id; /* output, used to free later */
}; };