Index: sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c,v retrieving revision 1.4 diff -p -u -r1.4 ttm_bo.c --- sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c 27 Jul 2014 00:40:39 -0000 1.4 +++ sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c 18 Aug 2014 00:28:26 -0000 @@ -33,6 +33,7 @@ #ifdef __NetBSD__ #include #include +#include #endif #include @@ -269,6 +270,10 @@ static int ttm_bo_add_ttm(struct ttm_buf page_flags, glob->dummy_read_page); if (unlikely(bo->ttm == NULL)) ret = -ENOMEM; +#ifdef __NetBSD__ + /* XXX DO NOT LET ME COMMIT UVM_OBJ_SETLOCK ON UVM_AOBJ. */ + uvm_obj_setlock(&bo->uvmobj, bo->ttm->swap_storage->vmobjlock); +#endif break; case ttm_bo_type_sg: bo->ttm = bdev->driver->ttm_tt_create(bdev, bo->num_pages << PAGE_SHIFT, @@ -279,6 +284,10 @@ static int ttm_bo_add_ttm(struct ttm_buf break; } bo->ttm->sg = bo->sg; +#ifdef __NetBSD__ + /* XXX DO NOT LET ME COMMIT UVM_OBJ_SETLOCK ON UVM_AOBJ. */ + uvm_obj_setlock(&bo->uvmobj, bo->ttm->swap_storage->vmobjlock); +#endif break; default: pr_err("Illegal buffer object type\n");