From 9a53ca82d003d644f8f8b5edce94d452f110335d Mon Sep 17 00:00:00 2001 From: Jian-Min Liu Date: Tue, 25 Jul 2023 16:39:52 +0000 Subject: [PATCH] Ensure virtualization macro are defined with ACK The "subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION" defined in the top-level Makefile seems to be ineffective in the ACK build, so it is redefined in each local Makefile. Bug 4187941 Change-Id: I47c515a20704736ea44881b65c59639bf8242760 Signed-off-by: Jian-Min Liu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2942314 Reviewed-by: svcacv Reviewed-by: Jonathan Hunter Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/misc/nvsciipc/Makefile | 4 ++++ drivers/video/tegra/nvmap/Makefile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/misc/nvsciipc/Makefile b/drivers/misc/nvsciipc/Makefile index 9ce5cf81..80dba553 100644 --- a/drivers/misc/nvsciipc/Makefile +++ b/drivers/misc/nvsciipc/Makefile @@ -7,4 +7,8 @@ ccflags-y += -I$(PWD) +ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),) +ccflags-$(CONFIG_TEGRA_VIRTUALIZATION) += -DCONFIG_TEGRA_VIRTUALIZATION +endif + obj-m += nvsciipc.o diff --git a/drivers/video/tegra/nvmap/Makefile b/drivers/video/tegra/nvmap/Makefile index d27e44fe..a3c02904 100644 --- a/drivers/video/tegra/nvmap/Makefile +++ b/drivers/video/tegra/nvmap/Makefile @@ -7,6 +7,10 @@ subdir-ccflags-y += -Werror include $(srctree.nvidia-oot)/drivers/video/tegra/nvmap/Makefile.memory.configs +ifneq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),) +ccflags-$(CONFIG_TEGRA_VIRTUALIZATION) += -DCONFIG_TEGRA_VIRTUALIZATION +endif + ifeq ($(NVMAP_CONFIG), y) # Build NvMap only when NVMAP_CONFIG is set to y nvmap-y := nvmap_core.o \