mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
The Tegra SOC nvlink driver and dGPU nvlink driver depend on struct definitions, macros and functions exposed by nvlink-core driver. The nvlink-core driver is not part of the nvgpu driver, hence we should not be directly accessing any core driver APIs/macros/structs from the /common/nvlink code. Common code can only use nvgpu internal APIs. We wrap all calls from common/nvlink.c to other drivers in nvgpu wrappers, and define the implementation of wrappers in os/linux and os/nvgpu_rmos, and stub them in os/posix. Also, we remove the implicit inclusion of OS specific nvlink header file via common nvgpu/nvlink.h. So the OS specific code needs to explicitly add OS specific header file. JIRA NVGPU-966 Change-Id: I65c67e247ee74088bb1253f6ae4c8d0c49420a98 Signed-off-by: Tejal Kudav <tkudav@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1990071 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>