

Code: Select all
diff -uNr linux-2.6.8-rc2-org/drivers/acpi/events/evxfevnt.c linux-2.6.8-rc2-fix/drivers/acpi/events/evxfevnt.c
--- linux-2.6.8-rc2-org/drivers/acpi/events/evxfevnt.c 2004-06-15 22:19:03.000000000 -0700
+++ linux-2.6.8-rc2-fix/drivers/acpi/events/evxfevnt.c 2004-07-20 13:23:50.990573272 -0700
@@ -45,9 +45,46 @@
#include <acpi/acpi.h>
#include <acpi/acevents.h>
#include <acpi/acnamesp.h>
+#include <linux/cpumask.h>
+#include <linux/sched.h>
+#include <asm/current.h>
+#include <asm/bitops.h>
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evxfevnt")
+#include <linux/init.h>
+static int acpi_bug;
+
+static int __init acpi_bug_set(char *str)
+{
+ acpi_bug = 1;
+ return 1;
+}
+__setup("acpi_cpu1_bug", acpi_bug_set);
+
+acpi_status
+acpi_hw_set_mode_from_cpu0(void)
+{
+ acpi_status status = AE_OK;
+ cpumask_t save_cpus_allowed, new_cpus_allowed;
+
+ save_cpus_allowed = current->cpus_allowed;
+
+ if (acpi_bug) {
+ /* force the CPU 1 bug */
+ new_cpus_allowed = current->cpus_allowed;
+ cpu_clear(0, new_cpus_allowed);
+ } else {
+ cpus_clear(new_cpus_allowed);
+ cpu_set(0, new_cpus_allowed);
+ }
+ set_cpus_allowed(current, new_cpus_allowed);
+
+ status = acpi_hw_set_mode (ACPI_SYS_MODE_ACPI);
+ set_cpus_allowed(current, (save_cpus_allowed));
+
+ return status;
+}
/*******************************************************************************
@@ -83,8 +120,8 @@
}
else {
/* Transition to ACPI mode */
-
- status = acpi_hw_set_mode (ACPI_SYS_MODE_ACPI);
+ // status = acpi_hw_set_mode (ACPI_SYS_MODE_ACPI);
+ status = acpi_hw_set_mode_from_cpu0();
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not transition to ACPI mode.\n"));
return_ACPI_STATUS (status);