From owner-svn-src-all@FreeBSD.ORG Tue Mar 20 20:37:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4374106564A; Tue, 20 Mar 2012 20:37:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D06DC8FC16; Tue, 20 Mar 2012 20:37:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2KKbNxV037016; Tue, 20 Mar 2012 20:37:23 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2KKbNfK037014; Tue, 20 Mar 2012 20:37:23 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203202037.q2KKbNfK037014@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Mar 2012 20:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233249 - head/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 20:37:24 -0000 Author: jkim Date: Tue Mar 20 20:37:23 2012 New Revision: 233249 URL: http://svn.freebsd.org/changeset/base/233249 Log: Fix another witness panic. We cannot enter critical section at all because AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 20120215 (r231844). To evaluate the method, we need malloc(9), which may sleep. Reported by: bschmidt MFC after: 3 days Modified: head/sys/amd64/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Tue Mar 20 19:47:59 2012 (r233248) +++ head/sys/amd64/acpica/acpi_wakeup.c Tue Mar 20 20:37:23 2012 (r233249) @@ -223,6 +223,7 @@ acpi_sleep_machdep(struct acpi_softc *sc #ifdef SMP cpuset_t wakeup_cpus; #endif + register_t rf; ACPI_STATUS status; int ret; @@ -241,8 +242,8 @@ acpi_sleep_machdep(struct acpi_softc *sc AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); + rf = intr_disable(); intr_suspend(); - spinlock_enter(); if (savectx(susppcbs[0])) { ctx_fpusave(suspfpusave[0]); @@ -299,8 +300,8 @@ out: #endif mca_resume(); - spinlock_exit(); intr_resume(); + intr_restore(rf); AcpiSetFirmwareWakingVector(0);