Date: Tue, 2 Oct 2007 16:16:10 -0500 From: Craig Boston <cb@severious.net> To: current@freebsd.org, danfe@FreeBSD.org Cc: Ben Kaduk <minimarmot@gmail.com> Subject: Re: Patch for nvidia-driver on current (panic: spin locks can only use msleep_spin) Message-ID: <20071002211610.GB33227@nowhere> In-Reply-To: <20071002204850.GA33227@nowhere> References: <20070921202523.GB4044@nowhere> <20071002204850.GA33227@nowhere>
next in thread | previous in thread | raw e-mail | index | archive | help
--/Uq4LBwYP4y1W6pO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Oops, I didn't notice that mutt got confused about the file type and used text/x-csrc, so mailman ate it. Patch should be attached to this message. Thanks to Ben Kaduk (whose message is still greylisted atm) for pointing it out. --/Uq4LBwYP4y1W6pO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-src::nvidia_os.c" --- src/nvidia_os.c.orig 2007-10-02 15:27:33.211059621 -0500 +++ src/nvidia_os.c 2007-10-02 15:27:43.708791970 -0500 @@ -598,7 +598,7 @@ != RM_OK)) return status; - mtx_init(&mtx->mutex_mtx, "rm.mutex_mtx", NULL, MTX_SPIN | MTX_RECURSE); + mtx_init(&mtx->mutex_mtx, "rm.mutex_mtx", NULL, MTX_DEF | MTX_RECURSE); cv_init(&mtx->mutex_wait, "rm.mutex_wait"); mtx->refcnt = 1; @@ -624,13 +624,13 @@ { struct os_mutex *mtx = semaphore; - mtx_lock_spin(&mtx->mutex_mtx); + mtx_lock(&mtx->mutex_mtx); if (mtx->refcnt > 0) rm_disable_interrupts(NULL); mtx->refcnt--; if (mtx->refcnt < 0) cv_wait(&mtx->mutex_wait, &mtx->mutex_mtx); - mtx_unlock_spin(&mtx->mutex_mtx); + mtx_unlock(&mtx->mutex_mtx); return RM_OK; } @@ -639,14 +639,14 @@ { struct os_mutex *mtx = semaphore; - mtx_lock_spin(&mtx->mutex_mtx); + mtx_lock(&mtx->mutex_mtx); if (mtx->refcnt < 1) { - mtx_unlock_spin(&mtx->mutex_mtx); + mtx_unlock(&mtx->mutex_mtx); return FALSE; } else { rm_disable_interrupts(NULL); mtx->refcnt--; - mtx_unlock_spin(&mtx->mutex_mtx); + mtx_unlock(&mtx->mutex_mtx); } return TRUE; @@ -656,13 +656,13 @@ { struct os_mutex *mtx = semaphore; - mtx_lock_spin(&mtx->mutex_mtx); + mtx_lock(&mtx->mutex_mtx); if (mtx->refcnt < 0) cv_signal(&mtx->mutex_wait); if (!mtx->refcnt) rm_enable_interrupts(NULL); mtx->refcnt++; - mtx_unlock_spin(&mtx->mutex_mtx); + mtx_unlock(&mtx->mutex_mtx); return RM_OK; } --/Uq4LBwYP4y1W6pO--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071002211610.GB33227>