diff --git a/os/linux/mem_mgmt_utils.c b/os/linux/mem_mgmt_utils.c index f8c896f..145242b 100644 --- a/os/linux/mem_mgmt_utils.c +++ b/os/linux/mem_mgmt_utils.c @@ -128,6 +128,8 @@ static int tegra_hwpm_dma_map_mem_bytes_buffer(struct tegra_soc_hwpm *hwpm, sg_dma_address(hwpm->mem_mgmt->mem_bytes_sgt->sgl); #if defined(CONFIG_TEGRA_HWPM_OOT) + hwpm->mem_mgmt->mem_bytes_kernel = + (struct dma_buf_map *) &hwpm->mem_mgmt->mem_bytes_map; err = dma_buf_vmap(hwpm->mem_mgmt->mem_bytes_dma_buf, #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) (struct iosys_map *)hwpm->mem_mgmt->mem_bytes_kernel); diff --git a/os/linux/mem_mgmt_utils.h b/os/linux/mem_mgmt_utils.h index 099d019..dd730b5 100644 --- a/os/linux/mem_mgmt_utils.h +++ b/os/linux/mem_mgmt_utils.h @@ -15,6 +15,9 @@ #define TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H #include +#if defined(CONFIG_TEGRA_HWPM_OOT) +#include +#endif /* This macro is copy of TEGRA_SOC_HWPM_MEM_BYTES_INVALID */ #define TEGRA_HWPM_MEM_BYTES_INVALID 0xffffffff @@ -38,6 +41,9 @@ struct tegra_hwpm_mem_mgmt { struct dma_buf_attachment *mem_bytes_attach; u64 mem_bytes_buf_va; void *mem_bytes_kernel; +#if defined(CONFIG_TEGRA_HWPM_OOT) + struct dma_buf_map mem_bytes_map; +#endif }; struct tegra_hwpm_allowlist_map {