diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 452bc152b..029503685 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -48,6 +48,11 @@ endif NVGPU_COMMON_CFLAGS := +# Enable debug flag for both safety debug and standard debug builds. +ifeq ($(NV_BUILD_CONFIGURATION_IS_DEBUG),1) +NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_BUILD_CONFIGURATION_IS_DEBUG +endif + # # Flags always enabled regardless of build profile. # @@ -202,6 +207,11 @@ endif CONFIG_NVGPU_FALCON_DEBUG := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FALCON_DEBUG +ifneq ($(NVGPU_HVRTOS),1) +CONFIG_NVGPU_SYSFS := 1 +NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS +endif + # # Flags enabled only for regular build profile. # @@ -216,11 +226,6 @@ endif endif endif -ifneq ($(NVGPU_HVRTOS),1) -CONFIG_NVGPU_SYSFS := 1 -NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS -endif - # Enable FSI Error injection support only on regular build when the # build configuartion is VLTest. The safety build will use # Mon process, so error injection on safety build is part of Mon diff --git a/drivers/gpu/nvgpu/os/posix/stubs.c b/drivers/gpu/nvgpu/os/posix/stubs.c index 5156f76fe..206269492 100644 --- a/drivers/gpu/nvgpu/os/posix/stubs.c +++ b/drivers/gpu/nvgpu/os/posix/stubs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -41,11 +41,13 @@ void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s) #ifdef CONFIG_NVGPU_SYSFS int nvgpu_ecc_sysfs_init(struct gk20a *g) { + (void)g; return 0; } void nvgpu_ecc_sysfs_remove(struct gk20a *g) { + (void)g; } #endif