diff options
author | Maxime Ripard <maxime@cerno.tech> | 2021-09-14 09:25:30 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-09-14 09:25:30 +0200 |
commit | 2f76520561d01a5f37e6d6ed2c2e441b6a355a96 (patch) | |
tree | 692f210145f35ec2621e2015d788267f25e673cb /drivers/misc/sgi-gru/grumain.c | |
parent | drm/ttm: Try to check if new ttm man out of bounds during compile (diff) | |
parent | Linux 5.15-rc1 (diff) | |
download | linux-2f76520561d01a5f37e6d6ed2c2e441b6a355a96.tar.xz linux-2f76520561d01a5f37e6d6ed2c2e441b6a355a96.zip |
Merge drm/drm-next into drm-misc-next
Kickstart new drm-misc-next cycle.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'drivers/misc/sgi-gru/grumain.c')
-rw-r--r-- | drivers/misc/sgi-gru/grumain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c index 40ac59dd018c..9afda47efbf2 100644 --- a/drivers/misc/sgi-gru/grumain.c +++ b/drivers/misc/sgi-gru/grumain.c @@ -282,7 +282,7 @@ static void gru_unload_mm_tracker(struct gru_state *gru, */ void gts_drop(struct gru_thread_state *gts) { - if (gts && atomic_dec_return(>s->ts_refcnt) == 0) { + if (gts && refcount_dec_and_test(>s->ts_refcnt)) { if (gts->ts_gms) gru_drop_mmu_notifier(gts->ts_gms); kfree(gts); @@ -323,7 +323,7 @@ struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, STAT(gts_alloc); memset(gts, 0, sizeof(struct gru_thread_state)); /* zero out header */ - atomic_set(>s->ts_refcnt, 1); + refcount_set(>s->ts_refcnt, 1); mutex_init(>s->ts_ctxlock); gts->ts_cbr_au_count = cbr_au_count; gts->ts_dsr_au_count = dsr_au_count; @@ -888,7 +888,7 @@ again: gts->ts_gru = gru; gts->ts_blade = gru->gs_blade_id; gts->ts_ctxnum = gru_assign_context_number(gru); - atomic_inc(>s->ts_refcnt); + refcount_inc(>s->ts_refcnt); gru->gs_gts[gts->ts_ctxnum] = gts; spin_unlock(&gru->gs_lock); |