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

This commit is contained in:
Jung-uk Kim 2013-08-29 22:46:21 +00:00
parent ee5bd4fc5a
commit 346c9ecee8
3 changed files with 5 additions and 8 deletions

View File

@ -1723,8 +1723,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
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 *bo,
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);

View File

@ -637,8 +637,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
* 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);

View File

@ -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.
*