diff --git a/drivers/tegra/hwpm/Makefile b/drivers/tegra/hwpm/Makefile index 07c0b68..b49e01c 100644 --- a/drivers/tegra/hwpm/Makefile +++ b/drivers/tegra/hwpm/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved. # # Tegra SOC HWPM # @@ -25,6 +25,7 @@ ccflags-y += -DCONFIG_TEGRA_HWPM_OOT CONFIG_TEGRA_FUSE_UPSTREAM := y ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM +LINUXINCLUDE += -I$(srctree.nvconftest) LINUXINCLUDE += -I$(srctree.hwpm)/include LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm/include LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm diff --git a/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h b/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h index e162f41..158f33d 100644 --- a/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h +++ b/drivers/tegra/hwpm/os/linux/mem_mgmt_utils.h @@ -17,9 +17,11 @@ #ifndef TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H #define TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H +#include + #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) +#if defined(NV_LINUX_IOSYS_MAP_H_PRESENT) #include #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) @@ -49,7 +51,7 @@ struct tegra_hwpm_mem_mgmt { struct dma_buf *mem_bytes_dma_buf; struct dma_buf_attachment *mem_bytes_attach; void *mem_bytes_kernel; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) +#if defined(NV_LINUX_IOSYS_MAP_H_PRESENT) struct iosys_map mem_bytes_map; #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)