summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2017-08-18 06:52:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-22 06:53:51 -0400
commit81868a187fa3b217368206f17b19309846e8e7fb (patch)
tree2b59e33b61cc6e206f7781f3b4ab44c5c7b6d721 /drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
parent5f010177de985c901c33c914efe70a8498a5974f (diff)
gpu: nvgpu: Nvgpu abstraction for linux barriers.
construct wrapper nvgpu_* methods to replace mb,rmb,wmb,smp_mb,smp_rmb,smp_wmb,read_barrier_depends and smp_read_barrier_depends. NVGPU-122 Change-Id: I8d24dd70fef5cb0fadaacc15f3ab11531667a0df Signed-off-by: Debarshi <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1541199 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sourab Gupta <sourabg@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/bitmap_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/bitmap_allocator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
index eae0475a..274e9c93 100644
--- a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c
@@ -18,6 +18,7 @@
18#include <nvgpu/allocator.h> 18#include <nvgpu/allocator.h>
19#include <nvgpu/kmem.h> 19#include <nvgpu/kmem.h>
20#include <nvgpu/bug.h> 20#include <nvgpu/bug.h>
21#include <nvgpu/barrier.h>
21 22
22#include "bitmap_allocator_priv.h" 23#include "bitmap_allocator_priv.h"
23 24
@@ -40,7 +41,7 @@ static int nvgpu_bitmap_alloc_inited(struct nvgpu_allocator *a)
40 struct nvgpu_bitmap_allocator *ba = a->priv; 41 struct nvgpu_bitmap_allocator *ba = a->priv;
41 int inited = ba->inited; 42 int inited = ba->inited;
42 43
43 rmb(); 44 nvgpu_smp_rmb();
44 return inited; 45 return inited;
45} 46}
46 47
@@ -408,7 +409,7 @@ int nvgpu_bitmap_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a,
408 goto fail; 409 goto fail;
409 } 410 }
410 411
411 wmb(); 412 nvgpu_smp_wmb();
412 a->inited = true; 413 a->inited = true;
413 414
414#ifdef CONFIG_DEBUG_FS 415#ifdef CONFIG_DEBUG_FS