From owner-freebsd-current@FreeBSD.ORG Tue Oct 2 21:16:11 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E11E916A468; Tue, 2 Oct 2007 21:16:11 +0000 (UTC) (envelope-from cb@severious.net) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id C2AB513C480; Tue, 2 Oct 2007 21:16:11 +0000 (UTC) (envelope-from cb@severious.net) Received: by ion.gank.org (Postfix, from userid 1001) id 94FD611A7B; Tue, 2 Oct 2007 16:16:11 -0500 (CDT) Date: Tue, 2 Oct 2007 16:16:10 -0500 From: Craig Boston To: current@freebsd.org, danfe@FreeBSD.org Message-ID: <20071002211610.GB33227@nowhere> Mail-Followup-To: Craig Boston , current@freebsd.org, danfe@FreeBSD.org, Ben Kaduk References: <20070921202523.GB4044@nowhere> <20071002204850.GA33227@nowhere> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="/Uq4LBwYP4y1W6pO" Content-Disposition: inline In-Reply-To: <20071002204850.GA33227@nowhere> User-Agent: Mutt/1.4.2.3i Cc: Ben Kaduk Subject: Re: Patch for nvidia-driver on current (panic: spin locks can only use msleep_spin) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 21:16:12 -0000 --/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--