aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r--arch/x86/kernel/head64.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index e25c57b8aa84..0ab59edd7067 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -25,6 +25,24 @@
25#include <asm/e820.h> 25#include <asm/e820.h>
26#include <asm/bios_ebda.h> 26#include <asm/bios_ebda.h>
27 27
28/* boot cpu pda */
29static struct x8664_pda _boot_cpu_pda __read_mostly;
30
31#ifdef CONFIG_SMP
32#ifdef CONFIG_DEBUG_PER_CPU_MAPS
33/*
34 * We install an empty cpu_pda pointer table to trap references before
35 * the actual cpu_pda pointer table is created in setup_cpu_pda_map().
36 */
37static struct x8664_pda *__cpu_pda[NR_CPUS] __initdata;
38#else
39static struct x8664_pda *__cpu_pda[1] __read_mostly;
40#endif
41
42#else /* !CONFIG_SMP (NR_CPUS will be 1) */
43static struct x8664_pda *__cpu_pda[NR_CPUS] __read_mostly;
44#endif
45
28static void __init zap_identity_mappings(void) 46static void __init zap_identity_mappings(void)
29{ 47{
30 pgd_t *pgd = pgd_offset_k(0UL); 48 pgd_t *pgd = pgd_offset_k(0UL);
@@ -156,10 +174,12 @@ void __init x86_64_start_kernel(char * real_mode_data)
156 174
157 early_printk("Kernel alive\n"); 175 early_printk("Kernel alive\n");
158 176
159 for (i = 0; i < NR_CPUS; i++) 177 _cpu_pda = __cpu_pda;
160 cpu_pda(i) = &boot_cpu_pda[i]; 178 cpu_pda(0) = &_boot_cpu_pda;
161
162 pda_init(0); 179 pda_init(0);
180
181 early_printk("Kernel really alive\n");
182
163 copy_bootdata(__va(real_mode_data)); 183 copy_bootdata(__va(real_mode_data));
164 184
165 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); 185 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");