mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
In gm20b_channel_bind an nvgpu_smp_wmb() was used presumably to prevent MMIO writes from being re-ordered after the memory write to 'ch->bound'. If that was to happen, then unbind routine could observe the channel as bound and issue concurrent MMIO writes to unbind the channel. Assuming, the barrier was to prevent such race, it should have been an nvgpu_wmb(), since nvgpu_smp_wmb() is for inner shareable domain only. However, the race possibility between unbind called from close path and bind from ALLOC_GPFIFO should be ruled out because close will wait for any active devctl/ioctl to finish before proceeding. The race possibility between unbind called from suspend_all_serviceable_ch path and bind from ALLOC_GPFIFO should be ruled out because ALLOC_GPFIFO has power refcount at the start of devctl/ioctl and suspend_all_serviceable_ch is called from prepare_poweroff path which ensure that power refcount is 0. Removed nvgpu_smp_wmb(). Jira NVGPU-4927 Change-Id: Ic4f072df364926c10be84e42b83394c13fc97fdc Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2298959 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Shashank Singh <shashsingh@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>