summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c
index 29f52081..2291a953 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_bitmap.c
@@ -42,6 +42,7 @@ static int gk20a_bitmap_alloc_inited(struct gk20a_allocator *a)
42{ 42{
43 struct gk20a_bitmap_allocator *ba = a->priv; 43 struct gk20a_bitmap_allocator *ba = a->priv;
44 44
45 rmb();
45 return ba->inited; 46 return ba->inited;
46} 47}
47 48
@@ -405,6 +406,7 @@ int gk20a_bitmap_allocator_init(struct gk20a_allocator *__a,
405 if (!a->bitmap) 406 if (!a->bitmap)
406 goto fail; 407 goto fail;
407 408
409 wmb();
408 a->inited = true; 410 a->inited = true;
409 411
410 gk20a_init_alloc_debug(__a); 412 gk20a_init_alloc_debug(__a);
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c
index 70a10c24..ee5e69d2 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c
@@ -1078,6 +1078,7 @@ static int gk20a_buddy_alloc_inited(struct gk20a_allocator *a)
1078{ 1078{
1079 struct gk20a_buddy_allocator *ba = a->priv; 1079 struct gk20a_buddy_allocator *ba = a->priv;
1080 1080
1081 rmb();
1081 return ba->initialized; 1082 return ba->initialized;
1082} 1083}
1083 1084
@@ -1284,6 +1285,7 @@ int __gk20a_buddy_allocator_init(struct gk20a_allocator *__a,
1284 if (err) 1285 if (err)
1285 goto fail; 1286 goto fail;
1286 1287
1288 wmb();
1287 a->initialized = 1; 1289 a->initialized = 1;
1288 1290
1289 gk20a_init_alloc_debug(__a); 1291 gk20a_init_alloc_debug(__a);