gpu: nvgpu: compiled out sysfs unit

sysfs is a non safe unit, it should be compiled out of safe build

JIRA NVGPU-3497

Change-Id: Ic4f23300d049ccc6e37401741797f73b9441d37c
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2133445
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kadamati
2019-05-23 15:44:06 +05:30
committed by mobile promotions
parent c482b0a409
commit 269fbec5c3
3 changed files with 8 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ ccflags-y += -DCONFIG_NVGPU_CE
ccflags-y += -DCONFIG_NVGPU_COMPRESSION
ccflags-y += -DCONFIG_NVGPU_SIM
ccflags-y += -DCONFIG_NVGPU_TRACE
ccflags-y += -DCONFIG_NVGPU_SYSFS
ifeq ($(CONFIG_NVGPU_LOGGING),y)
ccflags-y += -DCONFIG_NVGPU_LOGGING=1

View File

@@ -104,6 +104,9 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_LOGGING
CONFIG_NVGPU_TRACE := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_TRACE
CONFIG_NVGPU_SYSFS := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS
#
# Flags enabled only for regular build profile.
#

View File

@@ -366,11 +366,13 @@ int nvgpu_ecc_init_support(struct gk20a *g)
return err;
}
#ifdef CONFIG_NVGPU_SYSFS
err = nvgpu_ecc_sysfs_init(g);
if (err != 0) {
nvgpu_ecc_free(g);
return err;
}
#endif
g->ecc.initialized = true;
@@ -383,6 +385,8 @@ void nvgpu_ecc_remove_support(struct gk20a *g)
return;
}
#ifdef CONFIG_NVGPU_SYSFS
nvgpu_ecc_sysfs_remove(g);
#endif
nvgpu_ecc_free(g);
}