mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: remove barrier from gm20b_channel_bind
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>
This commit is contained in:
committed by
Alex Waterman
parent
6c4a0bb6cd
commit
1f9f28df8c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -55,7 +55,6 @@ void gm20b_channel_bind(struct nvgpu_channel *c)
|
|||||||
~ccsr_channel_enable_set_f(~U32(0U))) |
|
~ccsr_channel_enable_set_f(~U32(0U))) |
|
||||||
ccsr_channel_enable_set_true_f());
|
ccsr_channel_enable_set_true_f());
|
||||||
|
|
||||||
nvgpu_smp_wmb();
|
|
||||||
nvgpu_atomic_set(&c->bound, 1);
|
nvgpu_atomic_set(&c->bound, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user