diff --git a/drivers/tegra/hwpm/Makefile b/drivers/tegra/hwpm/Makefile index 24ba6b1..e212091 100644 --- a/drivers/tegra/hwpm/Makefile +++ b/drivers/tegra/hwpm/Makefile @@ -1,6 +1,6 @@ # -*- mode: makefile -*- # -# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. 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"), @@ -43,7 +43,10 @@ ccflags-y += -DCONFIG_TEGRA_HWPM_OOT CONFIG_TEGRA_FUSE_UPSTREAM := y ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM +ifneq ($(NV_BUILD_SYSTEM_TYPE),) +ccflags-y += -DCONFIG_TEGRA_HWPM_CONFTEST ccflags-y += -I$(srctree.nvconftest) +endif else # CONFIG_TEGRA_OOT_MODULE != m NVHWPM_OBJ = y diff --git a/drivers/tegra/hwpm/os/linux/driver.c b/drivers/tegra/hwpm/os/linux/driver.c index a20e47b..c51a238 100644 --- a/drivers/tegra/hwpm/os/linux/driver.c +++ b/drivers/tegra/hwpm/os/linux/driver.c @@ -10,7 +10,7 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. */ -#ifdef CONFIG_TEGRA_HWPM_OOT +#if defined(CONFIG_TEGRA_HWPM_CONFTEST) && defined(CONFIG_TEGRA_HWPM_OOT) #include #endif diff --git a/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.c b/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.c index f772068..670d638 100644 --- a/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.c +++ b/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.c @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only // SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +#if defined(CONFIG_TEGRA_HWPM_CONFTEST) && defined(CONFIG_TEGRA_HWPM_OOT) #include - +#endif #include #include #include diff --git a/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h b/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h index ff3288d..8bed0f7 100644 --- a/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h +++ b/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h @@ -17,7 +17,7 @@ #ifndef TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H #define TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H -#ifdef CONFIG_TEGRA_HWPM_OOT +#if defined(CONFIG_TEGRA_HWPM_CONFTEST) && defined(CONFIG_TEGRA_HWPM_OOT) #include #endif