From owner-freebsd-acpi@FreeBSD.ORG Wed Mar 7 16:24:42 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 2146B16A404 for ; Wed, 7 Mar 2007 16:24:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC6713C4BD for ; Wed, 7 Mar 2007 16:24:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l27GOUM1020245; Wed, 7 Mar 2007 11:24:33 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Bruce Evans Date: Wed, 7 Mar 2007 10:53:44 -0500 User-Agent: KMail/1.9.1 References: <200703011612.07110.shoesoft@gmx.net> <200703061310.11346.jhb@freebsd.org> <20070307155745.X28283@delplex.bde.org> In-Reply-To: <20070307155745.X28283@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703071053.45439.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 07 Mar 2007 11:24:33 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2763/Wed Mar 7 08:14:49 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx 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 16:24:42 -0000 On Wednesday 07 March 2007 00:14, Bruce Evans wrote: > 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. Hmm, well that should be fixed. > >> 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? 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. -- John Baldwin