PATCH: apm=power-off in 2.3.99 preX

From: Tony Hoyle (tmh@magenta-logic.com)
Date: Sun Mar 26 2000 - 12:09:41 EST


Since nobody has come up with a better fix for this bug, here is my
patch. Personally I don't like it (it leaves a kernel thread running
which isn't actually doing anything), but it's better than nothing....

Tony

--- linux/arch/i386/kernel/apm.c Fri Mar 10 01:15:02 2000
+++ linux-patched/arch/i386/kernel/apm.c Thu Mar 16 21:28:33 2000
@@ -1060,9 +1060,6 @@
 {
         DECLARE_WAITQUEUE(wait, current);
 
- if (smp_num_cpus > 1)
- return;
-
         add_wait_queue(&apm_waitqueue, &wait);
         current->state = TASK_INTERRUPTIBLE;
         for (;;) {
@@ -1076,6 +1073,11 @@
                  * so as not to count towards the load average)..
                  */
                 current->state = TASK_INTERRUPTIBLE;
+
+ /* Multiple CPUs, don't actually do anything */
+ if (smp_num_cpus > 1)
+ continue;
+
                 apm_event_handler();
 #ifdef CONFIG_APM_CPU_IDLE
                 if (!system_idle())

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:17 EST