lkml.org 
[lkml]   [1999]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: APM poweroff doesn't work with 2.2.x SMP kernel
Akira YOSHIYAMA wrote:

> Hi,
>
> I have a P6 SMP box and I'm using Linux 2.2.3 SMP kernel. But I
> can't power it off automatically with APM, but only displayed
> "Power down." Yes, I added "apm=smp-power-off" to boot time kernel
> parameter, -p option to halt. And I know that some patch is there
> but not applied to Linus kernel. Why not? He doesn't remember it?
>
> Regards,
>
> A.Yoshiyama <yosshy@debian.or.jp>
>
> -
> 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/

The attached patch works for me (TM).
--- linux.std/arch/i386/kernel/apm.c Fri Jan 15 06:57:25 1999
+++ linux/arch/i386/kernel/apm.c Wed Jan 27 23:01:38 1999
@@ -1378,14 +1378,6 @@
(apm_bios_info.dseg_len - 1) & 0xffff);
}
#endif
-#ifdef CONFIG_SMP
- if (smp_num_cpus > 1) {
- printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n");
- if (smp_hack)
- smp_hack = 2;
- return;
- }
-#endif
if (apm_bios_info.version > 0x100) {
/*
* We only support BIOSs up to version 1.2
@@ -1459,6 +1451,14 @@
if (apm_engage_power_management(0x0001) == APM_SUCCESS)
apm_bios_info.flags &= ~APM_BIOS_DISENGAGED;
}
+#ifdef CONFIG_SMP
+ if (smp_num_cpus > 1) {
+ printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n");
+ if (smp_hack)
+ smp_hack = 2;
+ return;
+ }
+#endif

init_timer(&apm_timer);
apm_timer.function = do_apm_timer;
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.091 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site