x86: change NR_CPUS arrays in numa_64
Change the following static arrays sized by NR_CPUS to per_cpu data variables: char cpu_to_node_map[NR_CPUS]; Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

committed by
Ingo Molnar

parent
3b41908902
commit
df3825c56d
@@ -65,6 +65,7 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/mce.h>
|
||||
#include <asm/ds.h>
|
||||
#include <asm/topology.h>
|
||||
|
||||
#ifdef CONFIG_PARAVIRT
|
||||
#include <asm/paravirt.h>
|
||||
@@ -359,8 +360,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
io_delay_init();
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* setup to use the static apicid table during kernel startup */
|
||||
/* setup to use the early static init tables during kernel startup */
|
||||
x86_cpu_to_apicid_early_ptr = (void *)&x86_cpu_to_apicid_init;
|
||||
x86_cpu_to_node_map_early_ptr = (void *)&x86_cpu_to_node_map_init;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
@@ -861,9 +861,12 @@ void __init smp_set_apicids(void)
|
||||
int cpu;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
if (per_cpu_offset(cpu))
|
||||
if (per_cpu_offset(cpu)) {
|
||||
per_cpu(x86_cpu_to_apicid, cpu) =
|
||||
x86_cpu_to_apicid_init[cpu];
|
||||
per_cpu(x86_cpu_to_node_map, cpu) =
|
||||
x86_cpu_to_node_map_init[cpu];
|
||||
}
|
||||
else
|
||||
printk(KERN_NOTICE "per_cpu_offset zero for cpu %d\n",
|
||||
cpu);
|
||||
@@ -871,6 +874,7 @@ void __init smp_set_apicids(void)
|
||||
|
||||
/* indicate the early static arrays are gone */
|
||||
x86_cpu_to_apicid_early_ptr = NULL;
|
||||
x86_cpu_to_node_map_early_ptr = NULL;
|
||||
}
|
||||
|
||||
static void __init smp_cpu_index_default(void)
|
||||
|
Reference in New Issue
Block a user