diff --git a/drivers/video/tegra/nvmap/nvmap_init.c b/drivers/video/tegra/nvmap/nvmap_init.c index b1ce30ce..ce82286a 100644 --- a/drivers/video/tegra/nvmap/nvmap_init.c +++ b/drivers/video/tegra/nvmap/nvmap_init.c @@ -580,6 +580,7 @@ void nvmap_dma_free_attrs(struct device *dev, size_t size, void *cpu_addr, } EXPORT_SYMBOL(nvmap_dma_free_attrs); +#ifdef CONFIG_TEGRA_VIRTUALIZATION void *nvmap_dma_mark_declared_memory_occupied(struct device *dev, dma_addr_t device_addr, size_t size) { @@ -631,6 +632,7 @@ void nvmap_dma_mark_declared_memory_unoccupied(struct device *dev, bitmap_clear(mem->bitmap, pos, alloc_size); spin_unlock_irqrestore(&mem->spinlock, flags); } +#endif /* CONFIG_TEGRA_VIRTUALIZATION */ void nvmap_dma_release_coherent_memory(struct dma_coherent_mem_replica *mem) { diff --git a/drivers/video/tegra/nvmap/nvmap_priv.h b/drivers/video/tegra/nvmap/nvmap_priv.h index 4f98b613..ed55815d 100644 --- a/drivers/video/tegra/nvmap/nvmap_priv.h +++ b/drivers/video/tegra/nvmap/nvmap_priv.h @@ -881,10 +881,13 @@ void nvmap_remove_device_name(char *device_name, u32 heap_type); bool dmabuf_is_nvmap(struct dma_buf *dmabuf); struct nvmap_handle *nvmap_handle_get_from_id(struct nvmap_client *client, u32 id); + +#ifdef CONFIG_TEGRA_VIRTUALIZATION void *nvmap_dma_mark_declared_memory_occupied(struct device *dev, dma_addr_t device_addr, size_t size); void nvmap_dma_mark_declared_memory_unoccupied(struct device *dev, dma_addr_t device_addr, size_t size); +#endif /* CONFIG_TEGRA_VIRTUALIZATION */ extern void __dma_flush_area(const void *cpu_va, size_t size); extern void __dma_map_area(const void *cpu_va, size_t size, int dir);