Re: [PATCH] Hotplug CPU prep V: x86 non-linear CPU numbers

Pavel Machek (pavel@ucw.cz)
Wed, 15 May 2002 12:13:14 +0200


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/