From a447c2b3b340cc041e87ad1c38d4fd33a0a4a39f Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Fri, 5 Apr 2019 16:12:04 -0400 Subject: [PATCH] gpu: nvgpu: unit: fix host build A previous change that added a flag around the fault injection mechanism broken the host userspace build. This patch fixes it by enabling the flag and adding the appropriate source file to the host Makefile JIRA NVGPU-1246 Change-Id: I060a04bdd28eaf5039fe1fb0d2ad6150d0a74455 Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2090906 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/Makefile | 2 ++ userspace/Makefile.configs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/userspace/Makefile b/userspace/Makefile index 0bf1266bf..fc120d5d5 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -53,6 +53,8 @@ INCLUDES= \ # This Makefile is only for host POSIX builds NVGPU_POSIX=1 +# Enable fault injection for unit tests +NVGPU_FAULT_INJECTION_ENABLEMENT=1 # Linuxy configs. We want these so that we can mirror builds from the actual # Linux kernel. diff --git a/userspace/Makefile.configs b/userspace/Makefile.configs index cf74699f7..aa5a1814f 100644 --- a/userspace/Makefile.configs +++ b/userspace/Makefile.configs @@ -44,7 +44,8 @@ CONFIGS := \ -DCONFIG_GK20A_VIDMEM=1 \ -DCONFIG_PCI_MSI \ -DCONFIG_SUPPORT_PMU_PSTATE \ - -DCONFIG_TEGRA_NVLINK + -DCONFIG_TEGRA_NVLINK \ + -DNVGPU_UNITTEST_FAULT_INJECTION_ENABLEMENT # Uncomment these to enable the config. # CONFIGS += -DCONFIG_NVGPU_TRACK_MEM_USAGE=y