acpi mpsafe panic? on acpi_panasonic

Nate Lawson nate at cryptography.com
Mon Aug 23 21:51:16 PDT 2004


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


-------------- next part --------------
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);


More information about the freebsd-acpi mailing list