NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ACPI call for testing



Hi all,
attached is a small but important patch for the ACPI subsystem.
The patch is known to fix interrupt routing issues on a number of
systems. There is a chance that it in fact fixes many of the outstanding
issues in this area. Typically signs are network devices always timing
out or a system load of 100% on an otherwise idle system with interrupt
counters racing up.

Please give the patch a try and report any regressions to an unpatched
kernel. I am also interested in reports for systems where ACPI has not
been working before. This patch is NetBSD 5.1 material, but only if it
gets tested properly.

For your convience, precompiled GENERIC kernels for i386 and amd64 for
netbsd-5 and netbsd-5-0 can be found at
http://ftp.netbsd.org/pub/NetBSD/misc/snj/acpi/
and for -current at:
http://ftp.netbsd.org/pub/NetBSD/misc/joerg/acpi/

Joerg
Index: acpi.c
===================================================================
RCS file: /home/joerg/repo/netbsd/src/sys/dev/acpi/acpi.c,v
retrieving revision 1.133
diff -u -p -r1.133 acpi.c
--- acpi.c      16 Sep 2009 16:34:49 -0000      1.133
+++ acpi.c      6 Nov 2009 21:19:10 -0000
@@ -478,22 +478,7 @@ acpi_attach(device_t parent, device_t se
                acpi_osd_debugger();
 #endif
 
-#define ACPI_ENABLE_PHASE1 \
-    (ACPI_NO_HANDLER_INIT | ACPI_NO_EVENT_INIT)
-#define ACPI_ENABLE_PHASE2 \
-    (ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE | \
-     ACPI_NO_ADDRESS_SPACE_INIT)
-
-       rv = AcpiEnableSubsystem(ACPI_ENABLE_PHASE1);
-       if (ACPI_FAILURE(rv)) {
-               aprint_error_dev(self, "unable to enable ACPI: %s\n",
-                   AcpiFormatException(rv));
-               return;
-       }
-
-       acpi_md_callback();
-
-       rv = AcpiEnableSubsystem(ACPI_ENABLE_PHASE2);
+       rv = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION);
        if (ACPI_FAILURE(rv)) {
                aprint_error_dev(self, "unable to enable ACPI: %s\n",
                    AcpiFormatException(rv));
@@ -510,6 +495,9 @@ acpi_attach(device_t parent, device_t se
                    AcpiFormatException(rv));
                return;
        }
+
+       acpi_md_callback();
+
        acpi_active = 1;
 
        /* Our current state is "awake". */


Home | Main Index | Thread Index | Old Index