From owner-cvs-src@FreeBSD.ORG Wed Nov 9 10:18:08 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8FB216A41F; Wed, 9 Nov 2005 10:18:08 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C73AC43D49; Wed, 9 Nov 2005 10:18:07 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jA9AI5Uf019687; Wed, 9 Nov 2005 21:18:05 +1100 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jA9AI3Ae012389; Wed, 9 Nov 2005 21:18:04 +1100 Date: Wed, 9 Nov 2005 21:18:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Warner Losh In-Reply-To: <200511090732.jA97W2ir099375@repoman.freebsd.org> Message-ID: <20051109204951.K68350@delplex.bde.org> References: <200511090732.jA97W2ir099375@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_power.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2005 10:18:08 -0000 On Wed, 9 Nov 2005, Warner Losh wrote: > Modified files: > sys/kern subr_power.c > Log: > Kick off the suspend sequence from the keyboard in a SWI rather than > in the hardware interrupt context (even if it is likely just an > ithread). We don't document that suspend/resume routines are run from > such a context and some of the things that happen in those routines > aren't interrupt safe. Since there's no real need to run from that > context, this restores assumptions that suspend routines have made. > > This fixes Thierry Herbelot's 'Trying to sleep while sleeping is > prohibited' problem. Er, SWIs are interrupts too. Trying to sleep in a SWI handler should cause the same message. This commit uses the general taskqueue SWI handler. taskqueue(9) implicitly says that only the taskqueue thread handler can sleep (it gives malloc(M_WAITOK) as an example of something that can only be done in thread context). Bruce