lkml.org 
[lkml]   [2002]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Hotplug CPU prep V: x86 non-linear CPU numbers
Hi!

> @@ -1585,7 +1581,7 @@
>
> p = buf;
>
> - if ((smp_num_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;

Are you sure? What if you add another CPU just after the test?
Pavel
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site