Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/ttm struct ttm_bo_device::fence_lock i...



details:   https://anonhg.NetBSD.org/src/rev/7199dd897372
branches:  trunk
changeset: 992817:7199dd897372
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:53:28 2018 +0000

description:
struct ttm_bo_device::fence_lock is no more.

diffstat:

 sys/external/bsd/drm2/ttm/ttm_bo_vm.c |  16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diffs (44 lines):

diff -r fcdb172719e0 -r 7199dd897372 sys/external/bsd/drm2/ttm/ttm_bo_vm.c
--- a/sys/external/bsd/drm2/ttm/ttm_bo_vm.c     Mon Aug 27 07:53:16 2018 +0000
+++ b/sys/external/bsd/drm2/ttm/ttm_bo_vm.c     Mon Aug 27 07:53:28 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo_vm.c,v 1.10 2015/07/28 01:25:00 riastradh Exp $ */
+/*     $NetBSD: ttm_bo_vm.c,v 1.11 2018/08/27 07:53:28 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.10 2015/07/28 01:25:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.11 2018/08/27 07:53:28 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -211,22 +211,16 @@
 static int
 ttm_bo_uvm_fault_idle(struct ttm_buffer_object *bo, struct uvm_faultinfo *ufi)
 {
-       struct ttm_bo_device *const bdev = bo->bdev;
-       int ret = 0;
 
-       spin_lock(&bdev->fence_lock);
        if (__predict_true(!test_bit(TTM_BO_PRIV_FLAG_MOVING,
                    &bo->priv_flags)))
-               goto out;
+               return 0;
        if (ttm_bo_wait(bo, false, false, true) == 0)
-               goto out;
+               return 0;
 
        uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, NULL);
        (void)ttm_bo_wait(bo, false, true, false);
-       ret = -ERESTART;
-
-out:   spin_unlock(&bdev->fence_lock);
-       return ret;
+       return -ERESTART;
 }
 
 int



Home | Main Index | Thread Index | Old Index