From owner-freebsd-current@FreeBSD.ORG Fri Jan 25 16:08:30 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 9797A767; Fri, 25 Jan 2013 16:08:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B2E46810; Fri, 25 Jan 2013 16:08:29 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA03087; Fri, 25 Jan 2013 18:08:23 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <5102ADF6.4060202@FreeBSD.org> Date: Fri, 25 Jan 2013 18:08:22 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130113 Thunderbird/17.0.2 MIME-Version: 1.0 To: John Baldwin Subject: Re: acpi resume related patch References: <510245B5.8070704@FreeBSD.org> <201301250851.25243.jhb@freebsd.org> In-Reply-To: <201301250851.25243.jhb@freebsd.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Fri, 25 Jan 2013 16:08:30 -0000 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 stopped 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 unconditionally > call lapic_setup() on resume.This was part of the feature of the previous > code that by using a dummy pic it could register it only when the local APIC > was used. Thank you for drawing my attention to this. I will try to fix this issue. 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 already explicitly initialized by APs. Putting it into 'pics' tailq just obfuscates the code. > It should also be registered before any of the I/O APICs are by > the design of the local_apic.c code. 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 initialization of Local APICs on APs and initialization of I/O APICs at the wakeup/resume time. -- Andriy Gapon