From fc35bcd19ba1bd7e4004b7cdb584e5fa33d1ee4d Mon Sep 17 00:00:00 2001 From: Vaibhav Kachore Date: Fri, 6 Dec 2019 09:35:25 +0000 Subject: [PATCH] gpu: nvgpu: remove sysfs from safety build - The only sysfs node supported on safety build was "/dev/gpu_powered_on". - In QNX, GPU is always powered on. So, this sysfs node doesn't convey any extra info. Hence, this patch removes sysfs from safety build. Bug 200573132 Change-Id: If5f2a6ac81eefb28e71fb919843328cbe87e417c Signed-off-by: Vaibhav Kachore Reviewed-on: https://git-master.nvidia.com/r/2256767 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.shared.configs | 6 +++--- drivers/gpu/nvgpu/os/posix/stubs.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 58f9af1d7..ecd6b96e5 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -81,9 +81,6 @@ ifneq ($(profile),safety_release) CONFIG_NVGPU_TRACE := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_TRACE -CONFIG_NVGPU_SYSFS := 1 -NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS - NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FALCON_DEBUG # @@ -91,6 +88,9 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FALCON_DEBUG # ifneq ($(profile),safety_debug) +CONFIG_NVGPU_SYSFS := 1 +NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS + # ACR feature to enable old tegra ACR profile support CONFIG_NVGPU_ACR_LEGACY := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_ACR_LEGACY diff --git a/drivers/gpu/nvgpu/os/posix/stubs.c b/drivers/gpu/nvgpu/os/posix/stubs.c index bdae76dd3..045b006be 100644 --- a/drivers/gpu/nvgpu/os/posix/stubs.c +++ b/drivers/gpu/nvgpu/os/posix/stubs.c @@ -38,6 +38,7 @@ void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s) } #endif +#ifdef CONFIG_NVGPU_SYSFS int nvgpu_ecc_sysfs_init(struct gk20a *g) { return 0; @@ -46,6 +47,7 @@ int nvgpu_ecc_sysfs_init(struct gk20a *g) void nvgpu_ecc_sysfs_remove(struct gk20a *g) { } +#endif void nvgpu_report_host_err(struct gk20a *g, u32 hw_unit, u32 inst, u32 err_id, u32 intr_info)