x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
authorMike Travis <travis@sgi.com>
Thu, 1 Jan 2009 02:08:46 +0000 (18:08 -0800)
committerIngo Molnar <mingo@elte.hu>
Sat, 3 Jan 2009 18:00:55 +0000 (19:00 +0100)
commit9628937d5b37169151c5f6bbd40919c6ac958a46
tree09e49f6960806e4115b3345ccc4b5745ca784074
parent6ca09dfc9f180d038dcef93c167a833f43a8246f
x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids

Impact: Reduce future system panics due to cpumask operations using NR_CPUS

Insure that code does not look at bits >= nr_cpu_ids as when cpumasks are
allocated based on nr_cpu_ids, these extra bits will not be defined.

Also some other minor updates:

   * change in to use cpu accessor function set_cpu_present() instead of
     directly accessing cpu_present_map w/cpu_clear() [arch/x86/kernel/reboot.c]

   * use cpumask_of() instead of &cpumask_of_cpu() [arch/x86/kernel/reboot.c]

   * optimize some cpu_mask_to_apicid_and functions.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 files changed:
arch/x86/include/asm/es7000/apic.h
arch/x86/include/asm/lguest.h
arch/x86/include/asm/numaq/apic.h
arch/x86/include/asm/summit/apic.h
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/apic.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpuid.c
arch/x86/kernel/msr.c
arch/x86/kernel/reboot.c
arch/x86/kernel/smpboot.c
arch/x86/mach-voyager/voyager_smp.c