]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: initialize map pointers in setup_32.c
authorGlauber de Oliveira Costa <gcosta@redhat.com>
Wed, 19 Mar 2008 17:25:20 +0000 (14:25 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:00 +0000 (17:41 +0200)
this will serve as a reference as to whether or not to
use the per_cpu variables in mpparse. Done the same way
as x86_64

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/setup_32.c

index d4ad6e8ae886d3b04ac584f9b79545faaeb9f188..eb97bcfe0f6f381b125ab4e4e5ea92e2d3306902 100644 (file)
@@ -722,6 +722,18 @@ char * __init __attribute__((weak)) memory_setup(void)
        return machine_specific_memory_setup();
 }
 
+#ifdef CONFIG_NUMA
+/*
+ * In the golden day, when everything among i386 and x86_64 will be
+ * integrated, this will not live here
+ */
+void *x86_cpu_to_node_map_early_ptr;
+int x86_cpu_to_node_map_init[NR_CPUS] = {
+       [0 ... NR_CPUS-1] = NUMA_NO_NODE
+};
+DEFINE_PER_CPU(int, x86_cpu_to_node_map) = NUMA_NO_NODE;
+#endif
+
 /*
  * Determine if we were loaded by an EFI loader.  If so, then we have also been
  * passed the efi memmap, systab, etc., so we should use these data structures
@@ -855,6 +867,18 @@ void __init setup_arch(char **cmdline_p)
 
        io_delay_init();
 
+#ifdef CONFIG_X86_SMP
+       /*
+        * setup to use the early static init tables during kernel startup
+        * X86_SMP will exclude sub-arches that don't deal well with it.
+        */
+       x86_cpu_to_apicid_early_ptr = (void *)x86_cpu_to_apicid_init;
+       x86_bios_cpu_apicid_early_ptr = (void *)x86_bios_cpu_apicid_init;
+#ifdef CONFIG_NUMA
+       x86_cpu_to_node_map_early_ptr = (void *)x86_cpu_to_node_map_init;
+#endif
+#endif
+
 #ifdef CONFIG_X86_GENERICARCH
        generic_apic_probe();
 #endif