Author: jkim
Date: Thu Aug 29 22:46:21 2013
New Revision: 255044
URL: http://svnweb.freebsd.org/changeset/base/255044

Log:
  Partially revert r254880.  The bitmap operations actually use long type now.

Modified:
  head/sys/dev/drm2/ttm/ttm_bo.c
  head/sys/dev/drm2/ttm/ttm_bo_util.c
  head/sys/dev/drm2/ttm/ttm_bo_vm.c

Modified: head/sys/dev/drm2/ttm/ttm_bo.c
==============================================================================
--- head/sys/dev/drm2/ttm/ttm_bo.c      Thu Aug 29 21:25:27 2013        
(r255043)
+++ head/sys/dev/drm2/ttm/ttm_bo.c      Thu Aug 29 22:46:21 2013        
(r255044)
@@ -1723,8 +1723,7 @@ int ttm_bo_wait(struct ttm_buffer_object
                if (driver->sync_obj_signaled(bo->sync_obj)) {
                        void *tmp_obj = bo->sync_obj;
                        bo->sync_obj = NULL;
-                       atomic_clear_long(&bo->priv_flags,
-                                         1UL << TTM_BO_PRIV_FLAG_MOVING);
+                       clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
                        mtx_unlock(&bdev->fence_lock);
                        driver->sync_obj_unref(&tmp_obj);
                        mtx_lock(&bdev->fence_lock);
@@ -1747,8 +1746,8 @@ int ttm_bo_wait(struct ttm_buffer_object
                if (likely(bo->sync_obj == sync_obj)) {
                        void *tmp_obj = bo->sync_obj;
                        bo->sync_obj = NULL;
-                       atomic_clear_long(&bo->priv_flags,
-                                         1UL << TTM_BO_PRIV_FLAG_MOVING);
+                       clear_bit(TTM_BO_PRIV_FLAG_MOVING,
+                                 &bo->priv_flags);
                        mtx_unlock(&bdev->fence_lock);
                        driver->sync_obj_unref(&sync_obj);
                        driver->sync_obj_unref(&tmp_obj);

Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c
==============================================================================
--- head/sys/dev/drm2/ttm/ttm_bo_util.c Thu Aug 29 21:25:27 2013        
(r255043)
+++ head/sys/dev/drm2/ttm/ttm_bo_util.c Thu Aug 29 22:46:21 2013        
(r255044)
@@ -637,8 +637,7 @@ int ttm_bo_move_accel_cleanup(struct ttm
                 * operation has completed.
                 */
 
-               atomic_set_long(&bo->priv_flags,
-                               1UL << TTM_BO_PRIV_FLAG_MOVING);
+               set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
                mtx_unlock(&bdev->fence_lock);
                if (tmp_obj)
                        driver->sync_obj_unref(&tmp_obj);

Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c
==============================================================================
--- head/sys/dev/drm2/ttm/ttm_bo_vm.c   Thu Aug 29 21:25:27 2013        
(r255043)
+++ head/sys/dev/drm2/ttm/ttm_bo_vm.c   Thu Aug 29 22:46:21 2013        
(r255044)
@@ -153,8 +153,7 @@ reserve:
         */
 
        mtx_lock(&bdev->fence_lock);
-       if ((atomic_load_acq_long(&bo->priv_flags) &
-           (1UL << TTM_BO_PRIV_FLAG_MOVING)) != 0) {
+       if (test_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags)) {
                /*
                 * Here, the behavior differs between Linux and FreeBSD.
                 *
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to