Messages in this thread Patch in this message | | | From | "Adam J. Richter" <> | Date | Thu, 19 Mar 1998 14:30:08 -0800 | Subject | linux-2.1.90 APM patch: please incorporate |
| |
Hello Linus,
I have now locally tested and verified that this patch enables Advanced Power Management on kernels that are compiled with SMP but only have one CPU, while ensuring that it is still disabled from machines that actually have more than one CPU. (At least I have verified this on x86, and since APM includes some x86 asm statements, that's all that can be supported right now anyhow). Kurt Garloff (garloff@kg1.ping.de) on linux-kernel@vger.rutgers.edu reports success using essentially the same change for at least two months now. Basically, the purpose of this patch is to allow one kernel binary that does the right thing with respect to APM on both uniprocessor and multiprocessor systems.
I would appreciate it if you would integrate this.
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205 adam@yggdrasil.com \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us."
--- /tmp/linux-2.1.90/drivers/char/apm_bios.c Wed Mar 11 15:10:39 1998 +++ linux/drivers/char/apm_bios.c Wed Mar 18 12:51:15 1998 @@ -1159,8 +1159,10 @@ static struct proc_dir_entry *ent; #ifdef __SMP__ - printk(KERN_NOTICE "APM disabled: APM is not SMP safe.\n"); - return; + if (smp_num_cpus > 1) { + printk(KERN_NOTICE "Advanced Power Managment disabled: APM is not multiprocessor safe.\n"); + return; + } #endif if (apm_bios_info.version == 0) { printk(KERN_INFO "APM BIOS not found.\n"); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |