SMP users: please test this patch

Adam J. Richter (adam@yggdrasil.com)
Wed, 18 Mar 1998 13:01:19 -0800


Now that the XFree86-3.3.2 S3 X server seems to be
getting along with the advanced power management support in
Linux 2.1.90, I have become interested in having one kernel
that has symmetric multiprocessing enabled but can also run
advanced power management on systems where only one processor is
present. So, I would appreciate it if somebody with a
multiprocessor machine would try the following patch and verify
that it does not activate APM if there actually is more than one
processor. It also fixes the problem of the kernel message using
abbreviations unknown to most users that it has not defined.

I am writing this message from a kernel compiled with SMP
support that has APM turned on because the machine it is running
on happens to have only one CPU.

Thanks in advance for your help in testing this patch.

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."
-------------------------------Cut here--------------------------------

--- /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