diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/drm/include/linux/wait.h | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index 5f84d8cae69..ef138c2175b 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.70 2020/11/14 23:08:47 kettenis Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.71 2020/12/10 12:24:06 jsg Exp $ */ /* * Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -109,7 +109,7 @@ long schedule_timeout(long timeout) { struct sleep_state sls; - long deadline; + unsigned long deadline; int wait, spl; MUTEX_ASSERT_LOCKED(&sch_mtx); @@ -128,10 +128,10 @@ schedule_timeout(long timeout) sleep_setup_signal(&sls); if (timeout != MAX_SCHEDULE_TIMEOUT) - deadline = ticks + timeout; + deadline = jiffies + timeout; sleep_finish_all(&sls, wait); if (timeout != MAX_SCHEDULE_TIMEOUT) - timeout = deadline - ticks; + timeout = deadline - jiffies; mtx_enter(&sch_mtx); MUTEX_OLDIPL(&sch_mtx) = spl; diff --git a/sys/dev/pci/drm/include/linux/wait.h b/sys/dev/pci/drm/include/linux/wait.h index 68a6e07ab7f..2552c534c68 100644 --- a/sys/dev/pci/drm/include/linux/wait.h +++ b/sys/dev/pci/drm/include/linux/wait.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wait.h,v 1.5 2020/06/08 04:48:15 jsg Exp $ */ +/* $OpenBSD: wait.h,v 1.6 2020/12/10 12:24:06 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -112,15 +112,16 @@ remove_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *old) ({ \ long ret = timo; \ do { \ - int deadline, __error; \ + int __error; \ + unsigned long deadline; \ \ KASSERT(!cold); \ \ mtx_enter(&sch_mtx); \ atomic_inc_int(&(wq).count); \ - deadline = ticks + ret; \ + deadline = jiffies + ret; \ __error = msleep(&wq, &sch_mtx, prio, "drmweti", ret); \ - ret = deadline - ticks; \ + ret = deadline - jiffies; \ atomic_dec_int(&(wq).count); \ if (__error == ERESTART || __error == EINTR) { \ ret = -ERESTARTSYS; \ @@ -174,7 +175,7 @@ do { \ * Sleep until `condition' gets true or `timo' expires. * * Returns 0 if `condition' is still false when `timo' expires or - * the remaining (>=1) ticks otherwise. + * the remaining (>=1) jiffies otherwise. */ #define wait_event_timeout(wq, condition, timo) \ ({ \ @@ -190,7 +191,7 @@ do { \ * * Returns -ERESTARTSYS if interrupted by a signal. * Returns 0 if `condition' is still false when `timo' expires or - * the remaining (>=1) ticks otherwise. + * the remaining (>=1) jiffies otherwise. */ #define wait_event_interruptible_timeout(wq, condition, timo) \ ({ \ |