diff options
author | Mike Travis <travis@sgi.com> | 2007-10-19 14:35:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-19 14:35:03 -0400 |
commit | 71fff5e6ca1b738ac4742580e4c0ff79d906f6c8 (patch) | |
tree | 390e67123d684ab7f490291db987e097e5b3c728 /arch/x86/mm/numa_64.c | |
parent | dbeb2be21d678c49a8d8bbf774903df15dd55474 (diff) |
x86: convert cpu_to_apicid to be a per cpu variable
This patch converts the x86_cpu_to_apicid array to be a per cpu
variable. This saves sizeof(apicid) * NR unused cpus. Access is mostly
from startup and CPU HOTPLUG functions.
MP_processor_info() is one of the functions that require access to the
x86_cpu_to_apicid array before the per_cpu data area is setup. For this
case, a pointer to the __initdata array is initialized in setup_arch()
and removed in smp_prepare_cpus() after the per_cpu data area is
initialized.
A second change is included to change the initial array value of ARCH
i386 from 0xff to BAD_APICID to be consistent with ARCH x86_64.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/numa_64.c')
-rw-r--r-- | arch/x86/mm/numa_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 5eec5e56d07f..3d6926ba8995 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -612,7 +612,7 @@ void __init init_cpu_to_node(void) | |||
612 | { | 612 | { |
613 | int i; | 613 | int i; |
614 | for (i = 0; i < NR_CPUS; i++) { | 614 | for (i = 0; i < NR_CPUS; i++) { |
615 | u8 apicid = x86_cpu_to_apicid[i]; | 615 | u8 apicid = x86_cpu_to_apicid_init[i]; |
616 | if (apicid == BAD_APICID) | 616 | if (apicid == BAD_APICID) |
617 | continue; | 617 | continue; |
618 | if (apicid_to_node[apicid] == NUMA_NO_NODE) | 618 | if (apicid_to_node[apicid] == NUMA_NO_NODE) |