]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/head64.c
Merge branch 'linus' into x86/urgent
[linux-2.6] / arch / x86 / kernel / head64.c
index f1773c8ee21ea9c2d8d7dc9fbd8430381fc631c9..c9781982914693cbb6ba98bf7cea94b1a291c8a5 100644 (file)
 #include <asm/e820.h>
 #include <asm/bios_ebda.h>
 
+/* boot cpu pda */
+static struct x8664_pda _boot_cpu_pda __read_mostly;
+
+#ifdef CONFIG_SMP
+/*
+ * We install an empty cpu_pda pointer table to indicate to early users
+ * (numa_set_node) that the cpu_pda pointer table for cpus other than
+ * the boot cpu is not yet setup.
+ */
+static struct x8664_pda *__cpu_pda[NR_CPUS] __initdata;
+#else
+static struct x8664_pda *__cpu_pda[NR_CPUS] __read_mostly;
+#endif
+
 static void __init zap_identity_mappings(void)
 {
        pgd_t *pgd = pgd_offset_k(0UL);
@@ -51,24 +65,6 @@ static void __init copy_bootdata(char *real_mode_data)
        }
 }
 
-static void __init reserve_setup_data(void)
-{
-       struct setup_data *data;
-       unsigned long pa_data;
-       char buf[32];
-
-       if (boot_params.hdr.version < 0x0209)
-               return;
-       pa_data = boot_params.hdr.setup_data;
-       while (pa_data) {
-               data = early_ioremap(pa_data, sizeof(*data));
-               sprintf(buf, "setup data %x", data->type);
-               reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf);
-               pa_data = data->next;
-               early_iounmap(data, sizeof(*data));
-       }
-}
-
 void __init x86_64_start_kernel(char * real_mode_data)
 {
        int i;
@@ -106,10 +102,17 @@ void __init x86_64_start_kernel(char * real_mode_data)
 
        early_printk("Kernel alive\n");
 
-       for (i = 0; i < NR_CPUS; i++)
-               cpu_pda(i) = &boot_cpu_pda[i];
-
+       _cpu_pda = __cpu_pda;
+       cpu_pda(0) = &_boot_cpu_pda;
        pda_init(0);
+
+       early_printk("Kernel really alive\n");
+
+       x86_64_start_reservations(real_mode_data);
+}
+
+void __init x86_64_start_reservations(char *real_mode_data)
+{
        copy_bootdata(__va(real_mode_data));
 
        reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");
@@ -125,7 +128,6 @@ void __init x86_64_start_kernel(char * real_mode_data)
 #endif
 
        reserve_ebda_region();
-       reserve_setup_data();
 
        /*
         * At this point everything still needed from the boot loader