From: Albert Cranford <ac9410@attbi.com>
To: Linus Torvalds <torvalds@transmeta.com>,
Linux Kernel List <linux-kernel@vger.kernel.org>
Cc: sfr@canb.auug.org.au
Subject: [PATCH] 2.5.29 fix for undef num_possible_cpus
Date: Sat, 27 Jul 2002 23:16:40 -0400 [thread overview]
Message-ID: <3D436218.5150A206@attbi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]
Hello Linus,
APM changes in 2.5.29 replaced num_online_cpus with
num_possible_cpus. I cannot find num_possible_cpus
defined anywhere.
Please revert back to num_online_cpus to link successfully.
Thanks,
Albert
--- linux/arch/i386/kernel/apm.c.orig 2002-07-27 14:31:23.000000000 -0400
+++ linux/arch/i386/kernel/apm.c 2002-07-27 14:32:27.000000000 -0400
@@ -1589,7 +1589,7 @@
p = buf;
- if ((num_possible_cpus() == 1) &&
+ if ((num_online_cpus() == 1) &&
!(error = apm_get_power_status(&bx, &cx, &dx))) {
ac_line_status = (bx >> 8) & 0xff;
battery_status = bx & 0xff;
@@ -1720,7 +1720,7 @@
}
}
- if (debug && (num_possible_cpus() == 1)) {
+ if (debug && (num_online_cpus() == 1)) {
error = apm_get_power_status(&bx, &cx, &dx);
if (error)
printk(KERN_INFO "apm: power status not available\n");
@@ -1764,7 +1764,7 @@
pm_power_off = apm_power_off;
register_sysrq_key('o', &sysrq_poweroff_op);
- if (num_possible_cpus() == 1) {
+ if (num_online_cpus() == 1) {
#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)
console_blank_hook = apm_console_blank;
#endif
@@ -1907,7 +1907,7 @@
printk(KERN_NOTICE "apm: disabled on user request.\n");
return -ENODEV;
}
- if ((num_possible_cpus() > 1) && !power_off) {
+ if ((num_online_cpus() > 1) && !power_off) {
printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n");
return -ENODEV;
}
@@ -1964,7 +1964,7 @@
kernel_thread(apm, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD);
- if (num_possible_cpus() > 1) {
+ if (num_online_cpus() > 1) {
printk(KERN_NOTICE
"apm: disabled - APM is not SMP safe (power off active).\n");
return 0;
--
Albert Cranford Deerfield Beach FL USA
ac9410@bellsouth.net
[-- Attachment #2: a --]
[-- Type: text/plain, Size: 1458 bytes --]
--- linux/arch/i386/kernel/apm.c.orig 2002-07-27 14:31:23.000000000 -0400
+++ linux/arch/i386/kernel/apm.c 2002-07-27 14:32:27.000000000 -0400
@@ -1589,7 +1589,7 @@
p = buf;
- if ((num_possible_cpus() == 1) &&
+ if ((num_online_cpus() == 1) &&
!(error = apm_get_power_status(&bx, &cx, &dx))) {
ac_line_status = (bx >> 8) & 0xff;
battery_status = bx & 0xff;
@@ -1720,7 +1720,7 @@
}
}
- if (debug && (num_possible_cpus() == 1)) {
+ if (debug && (num_online_cpus() == 1)) {
error = apm_get_power_status(&bx, &cx, &dx);
if (error)
printk(KERN_INFO "apm: power status not available\n");
@@ -1764,7 +1764,7 @@
pm_power_off = apm_power_off;
register_sysrq_key('o', &sysrq_poweroff_op);
- if (num_possible_cpus() == 1) {
+ if (num_online_cpus() == 1) {
#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)
console_blank_hook = apm_console_blank;
#endif
@@ -1907,7 +1907,7 @@
printk(KERN_NOTICE "apm: disabled on user request.\n");
return -ENODEV;
}
- if ((num_possible_cpus() > 1) && !power_off) {
+ if ((num_online_cpus() > 1) && !power_off) {
printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n");
return -ENODEV;
}
@@ -1964,7 +1964,7 @@
kernel_thread(apm, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD);
- if (num_possible_cpus() > 1) {
+ if (num_online_cpus() > 1) {
printk(KERN_NOTICE
"apm: disabled - APM is not SMP safe (power off active).\n");
return 0;
reply other threads:[~2002-07-28 3:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D436218.5150A206@attbi.com \
--to=ac9410@attbi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.