diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-12-30 10:09:49 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-12-30 10:09:49 +0000 |
commit | 3e2b5552e1514bde9312469478dc5dd6557c1449 (patch) | |
tree | 18cca36faf0b68729a54765531fe4fc66d630d16 /sys/dev/pci/drm | |
parent | b0bcdcbfe43c1f4fb84d87c929b3e96a7b858fea (diff) |
convert infinite msleep(9) to msleep_nsec(9)
ok mpi@
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/drm/drm_gem.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/include/linux/ww_mutex.h | 7 |
3 files changed, 11 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index e1cbe5a4259..8751587526b 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_drv.c,v 1.165 2019/08/18 13:11:47 kettenis Exp $ */ +/* $OpenBSD: drm_drv.c,v 1.166 2019/12/30 10:09:48 jsg Exp $ */ /*- * Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org> * Copyright © 2008 Intel Corporation @@ -352,8 +352,8 @@ drm_quiesce(struct drm_device *dev) mtx_enter(&dev->quiesce_mtx); dev->quiesce = 1; while (dev->quiesce_count > 0) { - msleep(&dev->quiesce_count, &dev->quiesce_mtx, - PZERO, "drmqui", 0); + msleep_nsec(&dev->quiesce_count, &dev->quiesce_mtx, + PZERO, "drmqui", INFSLP); } mtx_leave(&dev->quiesce_mtx); } @@ -732,8 +732,8 @@ drmread(dev_t kdev, struct uio *uio, int ioflag) mtx_leave(&dev->event_lock); return (EAGAIN); } - error = msleep(&file_priv->event_wait, &dev->event_lock, - PWAIT | PCATCH, "drmread", 0); + error = msleep_nsec(&file_priv->event_wait, &dev->event_lock, + PWAIT | PCATCH, "drmread", INFSLP); } if (error) { mtx_leave(&dev->event_lock); diff --git a/sys/dev/pci/drm/drm_gem.c b/sys/dev/pci/drm/drm_gem.c index 705bcfe1462..884cecd2a53 100644 --- a/sys/dev/pci/drm/drm_gem.c +++ b/sys/dev/pci/drm/drm_gem.c @@ -112,8 +112,8 @@ drm_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr, vm_page_t *pps, uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj, NULL); mtx_enter(&dev->quiesce_mtx); while (dev->quiesce) { - msleep(&dev->quiesce, &dev->quiesce_mtx, - PZERO, "drmflt", 0); + msleep_nsec(&dev->quiesce, &dev->quiesce_mtx, + PZERO, "drmflt", INFSLP); } mtx_leave(&dev->quiesce_mtx); return(VM_PAGER_REFAULT); diff --git a/sys/dev/pci/drm/include/linux/ww_mutex.h b/sys/dev/pci/drm/include/linux/ww_mutex.h index ef7416e43eb..a38780b8bd5 100644 --- a/sys/dev/pci/drm/include/linux/ww_mutex.h +++ b/sys/dev/pci/drm/include/linux/ww_mutex.h @@ -176,9 +176,10 @@ __ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx, bool slow, bo if (slow || ctx == NULL || (lock->ctx && ctx->stamp < lock->ctx->stamp)) { KASSERT(!cold); - int s = msleep(lock, &lock->base, - intr ? PCATCH : 0, - ctx ? ctx->ww_class->name : "ww_mutex_lock", 0); + int s = msleep_nsec(lock, &lock->base, + intr ? PCATCH : 0, + ctx ? ctx->ww_class->name : "ww_mutex_lock", + INFSLP); if (intr && (s == EINTR || s == ERESTART)) { // XXX: Should we handle ERESTART? err = -EINTR; |