mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
The CIRC_SPACE and CIRC_CNT macros work as expected when the buffer size is a power of two. The userspace-supplied number of inflight jobs is not necessarily so. Compare the get and put pointers manually. Jira NVGPU-4548 Change-Id: Ifa7bd6d78f82ec8efcac21fcca391053a2f6f311 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2328572 (cherry picked from commit 33dffa1cfb142eea0f28474566c31b632eee04f5) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2331340 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>