diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/lockless_allocator.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c index 04df7e3f..0df1ae9d 100644 --- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c | |||
@@ -60,9 +60,9 @@ static u64 nvgpu_lockless_alloc(struct nvgpu_allocator *a, u64 len) | |||
60 | if (len != pa->blk_size) | 60 | if (len != pa->blk_size) |
61 | return 0; | 61 | return 0; |
62 | 62 | ||
63 | head = ACCESS_ONCE(pa->head); | 63 | head = NV_ACCESS_ONCE(pa->head); |
64 | while (head >= 0) { | 64 | while (head >= 0) { |
65 | new_head = ACCESS_ONCE(pa->next[head]); | 65 | new_head = NV_ACCESS_ONCE(pa->next[head]); |
66 | ret = cmpxchg(&pa->head, head, new_head); | 66 | ret = cmpxchg(&pa->head, head, new_head); |
67 | if (ret == head) { | 67 | if (ret == head) { |
68 | addr = pa->base + head * pa->blk_size; | 68 | addr = pa->base + head * pa->blk_size; |
@@ -71,7 +71,7 @@ static u64 nvgpu_lockless_alloc(struct nvgpu_allocator *a, u64 len) | |||
71 | addr); | 71 | addr); |
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | head = ACCESS_ONCE(pa->head); | 74 | head = NV_ACCESS_ONCE(pa->head); |
75 | } | 75 | } |
76 | 76 | ||
77 | if (addr) | 77 | if (addr) |
@@ -93,8 +93,8 @@ static void nvgpu_lockless_free(struct nvgpu_allocator *a, u64 addr) | |||
93 | alloc_dbg(a, "Free node # %llu @ addr 0x%llx\n", cur_idx, addr); | 93 | alloc_dbg(a, "Free node # %llu @ addr 0x%llx\n", cur_idx, addr); |
94 | 94 | ||
95 | while (1) { | 95 | while (1) { |
96 | head = ACCESS_ONCE(pa->head); | 96 | head = NV_ACCESS_ONCE(pa->head); |
97 | ACCESS_ONCE(pa->next[cur_idx]) = head; | 97 | NV_ACCESS_ONCE(pa->next[cur_idx]) = head; |
98 | ret = cmpxchg(&pa->head, head, cur_idx); | 98 | ret = cmpxchg(&pa->head, head, cur_idx); |
99 | if (ret == head) { | 99 | if (ret == head) { |
100 | nvgpu_atomic_dec(&pa->nr_allocs); | 100 | nvgpu_atomic_dec(&pa->nr_allocs); |
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu.c b/drivers/gpu/nvgpu/common/pmu/pmu.c index 63597d10..89216ea2 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu.c | |||
@@ -413,7 +413,7 @@ static int nvgpu_pg_init_task(void *arg) | |||
413 | (pg_init->state_change == true), 0); | 413 | (pg_init->state_change == true), 0); |
414 | 414 | ||
415 | pmu->pg_init.state_change = false; | 415 | pmu->pg_init.state_change = false; |
416 | pmu_state = ACCESS_ONCE(pmu->pmu_state); | 416 | pmu_state = NV_ACCESS_ONCE(pmu->pmu_state); |
417 | 417 | ||
418 | if (pmu_state == PMU_STATE_EXIT) { | 418 | if (pmu_state == PMU_STATE_EXIT) { |
419 | nvgpu_pmu_dbg(g, "pmu state exit"); | 419 | nvgpu_pmu_dbg(g, "pmu state exit"); |