From owner-freebsd-acpi@FreeBSD.ORG Tue Aug 24 04:51:16 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3647C16A4CE for ; Tue, 24 Aug 2004 04:51:15 +0000 (GMT) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAA5E43D48 for ; Tue, 24 Aug 2004 04:51:15 +0000 (GMT) (envelope-from nate@cryptography.com) Received: from [10.0.5.51] (adsl-64-171-186-94.dsl.snfc21.pacbell.net [64.171.186.94]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id i7O4pE8U008250; Mon, 23 Aug 2004 21:51:15 -0700 Message-ID: <412AC940.7080408@cryptography.com> Date: Mon, 23 Aug 2004 21:51:12 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: OGAWA Takaya References: <86hdqtq1ii.wl.t-ogawa@triaez.kaisei.org> In-Reply-To: <86hdqtq1ii.wl.t-ogawa@triaez.kaisei.org> Content-Type: multipart/mixed; boundary="------------000406000106060607060206" cc: acpi@FreeBSD.org Subject: Re: acpi mpsafe panic? on acpi_panasonic X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 04:51:16 -0000 This is a multi-part message in MIME format. --------------000406000106060607060206 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit OGAWA Takaya wrote: > Hi, > > Sorry for reporting this late, but acpi_panasonic driver began to cause > problem after I think your acpi mpsafe commit. > > If none of WITNESS, INVARIANTS and INVARIANT_SUPPORT is turned on: > System does not goes up multi-user. The symptom is that the system > stops after the following message during boot: > >>Pre-seeding PRNG: > > Hitting Ctrl-T here shows that sysctl(8) is running and waiting for > "ACPI Panasonic extras", but neither Ctrl-C nor Ctrl-Alt-Del do not > take effect. > > If all of WITNESS, INVARIANTS and INVARIANT_SUPPORT are turned on: > Kernel panics. > >>witness_get: witness exhausted >>panic: _sx_xlock (ACPI Panasonic extras): xlock already held @ /usr/src/sys/modules/acpi/acpi_panasonic/../../../i386/acpica/acpi_panasonic.c:214 Please try the attached patch. -Nate --------------000406000106060607060206 Content-Type: text/plain; name="pan_hang.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pan_hang.diff" Index: sys/i386/acpica/acpi_panasonic.c =================================================================== RCS file: /home/ncvs/src/sys/i386/acpica/acpi_panasonic.c,v retrieving revision 1.3 diff -u -r1.3 acpi_panasonic.c --- sys/i386/acpica/acpi_panasonic.c 13 Aug 2004 06:22:31 -0000 1.3 +++ sys/i386/acpica/acpi_panasonic.c 24 Aug 2004 01:52:32 -0000 @@ -400,21 +400,32 @@ } static void -acpi_panasonic_notify(ACPI_HANDLE h, UINT32 notify, void *context) +acpi_panasonic_event(void *arg) { struct acpi_panasonic_softc *sc; UINT32 key; + sc = (struct acpi_panasonic_softc *)arg; + + ACPI_SERIAL_BEGIN(panasonic); + if (acpi_panasonic_hkey_event(sc, sc->handle, &key) == 0) { + acpi_panasonic_hkey_action(sc, sc->handle, key); + acpi_UserNotify("Panasonic", sc->handle, (uint8_t)key); + } + ACPI_SERIAL_END(panasonic); +} + +static void +acpi_panasonic_notify(ACPI_HANDLE h, UINT32 notify, void *context) +{ + struct acpi_panasonic_softc *sc; + sc = (struct acpi_panasonic_softc *)context; switch (notify) { case 0x80: - ACPI_SERIAL_BEGIN(panasonic); - if (acpi_panasonic_hkey_event(sc, h, &key) == 0) { - acpi_panasonic_hkey_action(sc, h, key); - acpi_UserNotify("Panasonic", h, (uint8_t)key); - } - ACPI_SERIAL_END(panasonic); + AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_panasonic_event, + sc); break; default: device_printf(sc->dev, "unknown notify: %#x\n", notify); --------------000406000106060607060206--