--- arch/i386/kernel/apm.c.org Sat Nov 10 00:58:02 2001 +++ arch/i386/kernel/apm.c Sun Dec 16 21:23:27 2001 @@ -383,6 +383,11 @@ static int allow_ints; #endif static int broken_psr; +#ifdef CONFIG_APM_CPU_IDLE +static int apm_idle_enabled = 1; +#else +static int apm_idle_enabled; +#endif static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); @@ -1366,7 +1371,8 @@ */ set_current_state(TASK_INTERRUPTIBLE); apm_event_handler(); -#ifdef CONFIG_APM_CPU_IDLE + if (!apm_idle_enabled) + continue; if (!system_idle()) continue; @@ -1393,7 +1399,6 @@ apm_event_handler(); timeout = 1; } -#endif } remove_wait_queue(&apm_waitqueue, &wait); } @@ -1814,6 +1819,8 @@ if ((strncmp(str, "realmode-power-off", 18) == 0) || (strncmp(str, "realmode_power_off", 18) == 0)) apm_info.realmode_power_off = !invert; + if (strncmp(str, "apm-idle", 8) == 0) + apm_idle_enabled = !invert; str = strchr(str, ','); if (str != NULL) str += strspn(str, ", \t");