gpu: nvgpu: Fix build for Linux v5.16-rc1

Building NVGPU against the current upstream mainline kernel is failing
and errors such as the following are seen.

ERROR: modpost: module nvgpu uses symbol dma_buf_map_attachment from
	namespace DMA_BUF, but does not import it.
ERROR: modpost: module nvgpu uses symbol dma_buf_detach from namespace
	DMA_BUF, but does not import it.
ERROR: modpost: module nvgpu uses symbol dma_buf_vmap from namespace
	DMA_BUF, but does not import it.

Following upstream commit 16b0314aa746 ("dma-buf: move dma-buf symbols
into the DMA_BUF module namespace"), it is now necessary to import the
DMA_BUF module namespace into the NVGPU driver to fix this.

Change-Id: I901b74cea692a5e0d66a190d01fe74a55aaf4431
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2621641
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Jon Hunter
2021-11-05 10:48:52 +00:00
committed by mobile promotions
parent 6cff904dc3
commit aa44d0e041

View File

@@ -2002,6 +2002,9 @@ static void __exit gk20a_exit(void)
platform_driver_unregister(&gk20a_driver);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif
MODULE_LICENSE("GPL v2");
module_init(gk20a_init);
module_exit(gk20a_exit);