diff options
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r-- | arch/x86/kernel/head64.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 5fbed459ff3b..c970929bb15d 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -25,6 +25,20 @@ | |||
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 */ | ||
29 | static struct x8664_pda _boot_cpu_pda __read_mostly; | ||
30 | |||
31 | #ifdef CONFIG_SMP | ||
32 | /* | ||
33 | * We install an empty cpu_pda pointer table to indicate to early users | ||
34 | * (numa_set_node) that the cpu_pda pointer table for cpus other than | ||
35 | * the boot cpu is not yet setup. | ||
36 | */ | ||
37 | static struct x8664_pda *__cpu_pda[NR_CPUS] __initdata; | ||
38 | #else | ||
39 | static struct x8664_pda *__cpu_pda[NR_CPUS] __read_mostly; | ||
40 | #endif | ||
41 | |||
28 | static void __init zap_identity_mappings(void) | 42 | static void __init zap_identity_mappings(void) |
29 | { | 43 | { |
30 | pgd_t *pgd = pgd_offset_k(0UL); | 44 | pgd_t *pgd = pgd_offset_k(0UL); |
@@ -88,10 +102,12 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
88 | 102 | ||
89 | early_printk("Kernel alive\n"); | 103 | early_printk("Kernel alive\n"); |
90 | 104 | ||
91 | for (i = 0; i < NR_CPUS; i++) | 105 | _cpu_pda = __cpu_pda; |
92 | cpu_pda(i) = &boot_cpu_pda[i]; | 106 | cpu_pda(0) = &_boot_cpu_pda; |
93 | |||
94 | pda_init(0); | 107 | pda_init(0); |
108 | |||
109 | early_printk("Kernel really alive\n"); | ||
110 | |||
95 | copy_bootdata(__va(real_mode_data)); | 111 | copy_bootdata(__va(real_mode_data)); |
96 | 112 | ||
97 | reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); | 113 | reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); |