tegra: hwpm: os: linux: add explicit CONFTEST flag

CONFTEST is NVIDIA internal and not available when
building HWPM driver locally without NVIDIA build
system. This patch introduces a new explicit config
to enable/disable reference to CONFTEST.

Bug 5120925

Change-Id: I669855f04186041661362cd578514b887128ef44
Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3307050
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Yifei Wan <ywan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
This commit is contained in:
Besar Wicaksono
2025-02-20 18:14:54 +00:00
committed by mobile promotions
parent 547508653d
commit c39de268c9
4 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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 <nvidia/conftest.h>
#endif

View File

@@ -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 <nvidia/conftest.h>
#endif
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/kernel.h>

View File

@@ -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 <nvidia/conftest.h>
#endif