]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86: improve UP kernel when CPU-hotplug and SMP is enabled
authorThomas Gleixner <tglx@linutronix.de>
Mon, 13 Oct 2008 17:15:23 +0000 (17:15 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Oct 2008 21:05:12 +0000 (14:05 -0700)
commit75402d996fe1fe834ce1d1ed5d600407b23a8713
treece1ca1e8e5930cc95fd5cbfdbab092c535f13636
parent3be261e3f5e2ee64f36d40f1b06d345e1dd62012
x86: improve UP kernel when CPU-hotplug and SMP is enabled

commit 649c6653fa94ec8f3ea32b19c97b790ec4e8e4ac upstream

num_possible_cpus() can be > 1 when disabled CPUs have been accounted.

Disabled CPUs are not in the cpu_present_map, so we can use
num_present_cpus() as a safe indicator to switch to UP alternatives.

Reported-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/alternative.c