summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/lockless_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/lockless_allocator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
index eeb86095..8f712a14 100644
--- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c
@@ -17,6 +17,7 @@
17#include <nvgpu/atomic.h> 17#include <nvgpu/atomic.h>
18#include <nvgpu/allocator.h> 18#include <nvgpu/allocator.h>
19#include <nvgpu/kmem.h> 19#include <nvgpu/kmem.h>
20#include <nvgpu/barrier.h>
20 21
21#include "lockless_allocator_priv.h" 22#include "lockless_allocator_priv.h"
22 23
@@ -39,7 +40,7 @@ static int nvgpu_lockless_alloc_inited(struct nvgpu_allocator *a)
39 struct nvgpu_lockless_allocator *pa = a->priv; 40 struct nvgpu_lockless_allocator *pa = a->priv;
40 int inited = pa->inited; 41 int inited = pa->inited;
41 42
42 rmb(); 43 nvgpu_smp_rmb();
43 return inited; 44 return inited;
44} 45}
45 46
@@ -198,7 +199,7 @@ int nvgpu_lockless_allocator_init(struct gk20a *g, struct nvgpu_allocator *__a,
198 a->flags = flags; 199 a->flags = flags;
199 nvgpu_atomic_set(&a->nr_allocs, 0); 200 nvgpu_atomic_set(&a->nr_allocs, 0);
200 201
201 wmb(); 202 nvgpu_smp_wmb();
202 a->inited = true; 203 a->inited = true;
203 204
204#ifdef CONFIG_DEBUG_FS 205#ifdef CONFIG_DEBUG_FS