Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 2004 21:51:12 -0700
From:      Nate Lawson <nate@cryptography.com>
To:        OGAWA Takaya <t-ogawa@triaez.kaisei.org>
Cc:        acpi@FreeBSD.org
Subject:   Re: acpi mpsafe panic? on acpi_panasonic
Message-ID:  <412AC940.7080408@cryptography.com>
In-Reply-To: <86hdqtq1ii.wl.t-ogawa@triaez.kaisei.org>
References:  <86hdqtq1ii.wl.t-ogawa@triaez.kaisei.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?412AC940.7080408>