diff options
| author | Alex Deucher <[email protected]> | 2019-06-25 13:42:25 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-06-25 13:42:25 +0000 |
| commit | d7929c1e13e3788e7cb741d75b5baec5e53eff21 (patch) | |
| tree | cf513071edfc4499b4e025e4846244c9d0e4c6bd /lib/lockref.c | |
| parent | drm/amdgpu: disable gfxoff on navi10 (diff) | |
| parent | drm/edid: use for_each_displayid_db where applicable (diff) | |
| download | kernel-d7929c1e13e3788e7cb741d75b5baec5e53eff21.tar.gz kernel-d7929c1e13e3788e7cb741d75b5baec5e53eff21.zip | |
Merge branch 'drm-next' into drm-next-5.3
Backmerge drm-next and fix up conflicts due to drmP.h removal.
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'lib/lockref.c')
| -rw-r--r-- | lib/lockref.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/lockref.c b/lib/lockref.c index 3d468b53d4c9..5b34bbd3eba8 100644 --- a/lib/lockref.c +++ b/lib/lockref.c @@ -9,6 +9,7 @@ * failure case. */ #define CMPXCHG_LOOP(CODE, SUCCESS) do { \ + int retry = 100; \ struct lockref old; \ BUILD_BUG_ON(sizeof(old) != 8); \ old.lock_count = READ_ONCE(lockref->lock_count); \ @@ -21,6 +22,8 @@ if (likely(old.lock_count == prev.lock_count)) { \ SUCCESS; \ } \ + if (!--retry) \ + break; \ cpu_relax(); \ } \ } while (0) |
