aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authortravis@sgi.com <travis@sgi.com>2008-01-30 13:33:11 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:33:11 +0100
commitdf3825c56dd70a4d7796041388f3cfe51c1db832 (patch)
tree6110ef6ce26704679b9d13399e2aa368f3430126 /arch/x86/kernel
parent3b41908902df1dba141cd7de1a727bb03718a654 (diff)
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>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup_64.c4
-rw-r--r--arch/x86/kernel/smpboot_64.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index e2beb4cba15..529e45c37b1 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -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
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index a2076b5f12a..a8bc2bcdb74 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -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)