From owner-freebsd-acpi@FreeBSD.ORG Thu Mar 8 07:32:49 2007 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1964816A485; Thu, 8 Mar 2007 07:32:49 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by mx1.freebsd.org (Postfix) with ESMTP id D4D1A13C428; Thu, 8 Mar 2007 07:32:48 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 6C6295A0FC7; Thu, 8 Mar 2007 18:32:47 +1100 (EST) Received: from besplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 68F688C05; Thu, 8 Mar 2007 18:32:46 +1100 (EST) Date: Thu, 8 Mar 2007 18:32:44 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <200703071053.45439.jhb@freebsd.org> Message-ID: <20070308183232.F3026@besplex.bde.org> References: <200703011612.07110.shoesoft@gmx.net> <200703061310.11346.jhb@freebsd.org> <20070307155745.X28283@delplex.bde.org> <200703071053.45439.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-acpi@FreeBSD.org, Stefan Ehmann Subject: Re: notebook freezes X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2007 07:32:49 -0000 On Wed, 7 Mar 2007, John Baldwin wrote: > On Wednesday 07 March 2007 00:14, Bruce Evans wrote: >> I forgot to ask about the problem of interrupts racing with resume. >> What stops an interrupt occurring before the resume methods (the device >> method and all the ones above it) complete? I don't know of any locking >> to prevent this or any way to detect this short of checking for magic >> garbage in device registers that have garbage in them because the >> registers are unmapped or just clobbered. Can suspend happen >> asynchronously, so that it is possible for resume to deadlock on a >> resource locked by somthing which was interrupted for the suspend? > > I don't think there is stuff in there to protect against locks being held. > However, each device is supposed to turn its device off in it's > device_suspend() method and then turn it back on in device_resume() which > should resolve problems with garbage registers and spurious interrupts. pmtimer doesn't do this of course. Turning of RTC interrupts is easy, but turning off i8254 interrupts seems to require bus_teardown_intr(). Bruce