From owner-freebsd-acpi@FreeBSD.ORG Wed Mar 7 05:14:41 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 C15F016A400; Wed, 7 Mar 2007 05:14:41 +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 8AD1913C481; Wed, 7 Mar 2007 05:14:41 +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 1D38B5A3CF3; Wed, 7 Mar 2007 16:14:40 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 010008C1F; Wed, 7 Mar 2007 16:14:38 +1100 (EST) Date: Wed, 7 Mar 2007 16:14:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200703061310.11346.jhb@freebsd.org> Message-ID: <20070307155745.X28283@delplex.bde.org> References: <200703011612.07110.shoesoft@gmx.net> <200703061027.25387.jhb@freebsd.org> <45ED9D71.5040904@root.org> <200703061310.11346.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: Wed, 07 Mar 2007 05:14:41 -0000 On Tue, 6 Mar 2007, John Baldwin wrote: > On Tuesday 06 March 2007 11:57, Nate Lawson wrote: >> John Baldwin wrote: >>> On Monday 05 March 2007 16:19, Nate Lawson wrote: >>>>> Where do timer updates on suspend/resume happen for acpi? >>>> pmtimer handles both (see NOTES) since DEVICE_RESUME() is called from >>>> both apm and acpi. >>> >>> pmtimer should be on by default in 7 I think. It is for amd64 already > IIRC, >>> just not for i386. Actually, for amd64, neither pmtimer nor suspend/resume methods in clock.c exist. >> Yeah, I see it in GENERIC. His issue was just driver error with the >> patch. The patch has been committed. > > I'm saying in general that pmtimer should really not be optional. It's a > small amount of code, so there isn't really anything gained by leaving it > out. I agree. 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? Bruce