From owner-freebsd-current@FreeBSD.ORG Mon Jan 28 12:44:31 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F0AA9F7B; Mon, 28 Jan 2013 12:44:31 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id BD02D7EA; Mon, 28 Jan 2013 12:44:31 +0000 (UTC) Received: from localhost (dlt174.neoplus.adsl.tpnet.pl [83.24.49.174]) by mail.dawidek.net (Postfix) with ESMTPSA id F0CDBDE9; Mon, 28 Jan 2013 13:41:45 +0100 (CET) Date: Mon, 28 Jan 2013 13:45:05 +0100 From: Pawel Jakub Dawidek To: Andriy Gapon Subject: Re: acpi resume related patch Message-ID: <20130128124505.GA1361@garage.freebsd.pl> References: <510245B5.8070704@FreeBSD.org> <201301250851.25243.jhb@freebsd.org> <5102ADF6.4060202@FreeBSD.org> <5103E5D1.3070808@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: <5103E5D1.3070808@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 28 Jan 2013 12:44:32 -0000 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 26, 2013 at 04:18:57PM +0200, Andriy Gapon wrote: > on 25/01/2013 18:08 Andriy Gapon said the following: > > on 25/01/2013 15:51 John Baldwin said the following: > >> On Friday, January 25, 2013 3:43:33 am Andriy Gapon wrote: > >>> > >>> If you have ACPI suspend/resume working, if it used to work but stopp= ed working > >>> at some time, if it never worked, but you are still hoping, could you= please > >>> test the following patch and report back? > >>> > >>> http://svn.freebsd.by/files/acpi-apic-wakeup-final.patch > >> > >> This will break systems not using the local APIC since you uncondition= ally > >> call lapic_setup() on resume.This was part of the feature of the previ= ous > >> code that by using a dummy pic it could register it only when the loca= l APIC > >> was used. > >=20 > > Thank you for drawing my attention to this. I will try to fix this iss= ue. > > The reason I want to remove lapic from 'pics' (and I already described = it in a > > private email) is that Local APIC is a special kind of PIC. It's alrea= dy > > explicitly initialized by APs. Putting it into 'pics' tailq just obfus= cates the code. > >=20 > >> It should also be registered before any of the I/O APICs are by > >> the design of the local_apic.c code. > >=20 > > In fact, as I see in the code, Local APIC is always registered _after_ = I/O APICs. > > And thus lapic_resume was called after ioapic_resume. > > Additionally, currently there is no synchronization between initializat= ion of > > Local APICs on APs and initialization of I/O APICs at the wakeup/resume= time. > >=20 >=20 > Here is an updated version of the patch: > http://people.freebsd.org/~avg/acpi-apic-wakeup.2.patch FYI, it doesn't change anything for me. Resume seems to work, but suspend just reset my laptop. I unload all driver modules (including if_em, sound, nvidia, usb). The only driver I keep is ahci. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEGctEACgkQForvXbEpPzRAEACg8wl3lXy0VJAPofdZLnHFs0+6 +TAAn1wxys7UTovNR+OJnCLGXLzvd2qr =5yct -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J--