From owner-cvs-src@FreeBSD.ORG Wed Nov 19 13:40:02 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB5FA16A4CE for ; Wed, 19 Nov 2003 13:40:02 -0800 (PST) Received: from mail.speakeasy.net (mail7.speakeasy.net [216.254.0.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1655E43FF2 for ; Wed, 19 Nov 2003 13:39:59 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 13430 invoked from network); 19 Nov 2003 21:39:58 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 19 Nov 2003 21:39:58 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id hAJLdoFn026040; Wed, 19 Nov 2003 16:39:50 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200311192027.hAJKR6IY081207@repoman.freebsd.org> Date: Wed, 19 Nov 2003 16:39:49 -0500 (EST) From: John Baldwin To: Nate Lawson X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: RE: cvs commit: src/sys/dev/acpica acpi.c acpi_cpu.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2003 21:40:02 -0000 On 19-Nov-2003 Nate Lawson wrote: > njl 2003/11/19 12:27:06 PST > > FreeBSD src repository > > Modified files: > sys/dev/acpica acpi.c acpi_cpu.c > Log: > * Add a DEVMETHOD for acpi so that child detach methods get called. Add > an acpi_cpu method for shutdown that disables entry to acpi_cpu_idle > and then IPIs/waits for threads to exit. This fixes a panic late in > reboot in the SMP case. > > * In the !SMP case, don't use the processor id filled out by the MADT > since there can only be one processor. This was causing a panic in > acpi_cpu_idle if the id was 1 since the data was being dereferenced from > cpu_softc[1] even though the actual data was in cpu_softc[0] (which is > correct). > > * Rework the initialization functions so that cpu_idle_hook is written > late in the boot process. > > * Make the P_BLK, P_BLK_LEN, and cpu_cx_count all softc-local variables. > This will help SMP boxes that have _CST or multiple P_BLKs. No such > boxes are known at this time. > > * Always allocate the C1 state, even if the P_BLK is invalid. This means > we will always take over idling if enabled. Remove the value -1 as > valid for cx_lowest since this is redundant with machdep.cpu_idle_hlt. > > * Reduce locking for the throttle initialization case to around the write > to the smi_cmd port. Add disabled code to write the CST_CNT. It will > be enabled once _CST re-evaluation is tested (post 5.2R). > > Thank you: dfr, imp, jhb, marcel, peter > Tested by: rwatson, Harald Schmalzbauer > Approved by: re (rwatson) One minor suggestion btw. Could you fix the hw.acpi.cpu.cpu_cx_lowest to use the "C1", "C2", and "C3" strings for its user-visible interface instead of the direct integer? Setting the value to C2 is a bit more intuitive than setting it to 1 to get C2. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/