diff options
Diffstat (limited to 'arch/x86/kernel/mpparse_64.c')
-rw-r--r-- | arch/x86/kernel/mpparse_64.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index 8bf0ca03ac8e..ef4aab123581 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -57,6 +57,8 @@ unsigned long mp_lapic_addr = 0; | |||
57 | 57 | ||
58 | /* Processor that is doing the boot up */ | 58 | /* Processor that is doing the boot up */ |
59 | unsigned int boot_cpu_id = -1U; | 59 | unsigned int boot_cpu_id = -1U; |
60 | EXPORT_SYMBOL(boot_cpu_id); | ||
61 | |||
60 | /* Internal processor count */ | 62 | /* Internal processor count */ |
61 | unsigned int num_processors __cpuinitdata = 0; | 63 | unsigned int num_processors __cpuinitdata = 0; |
62 | 64 | ||
@@ -86,7 +88,7 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
86 | return sum & 0xFF; | 88 | return sum & 0xFF; |
87 | } | 89 | } |
88 | 90 | ||
89 | static void __cpuinit MP_processor_info (struct mpc_config_processor *m) | 91 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) |
90 | { | 92 | { |
91 | int cpu; | 93 | int cpu; |
92 | cpumask_t tmp_map; | 94 | cpumask_t tmp_map; |
@@ -123,7 +125,18 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m) | |||
123 | cpu = 0; | 125 | cpu = 0; |
124 | } | 126 | } |
125 | bios_cpu_apicid[cpu] = m->mpc_apicid; | 127 | bios_cpu_apicid[cpu] = m->mpc_apicid; |
126 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | 128 | /* |
129 | * We get called early in the the start_kernel initialization | ||
130 | * process when the per_cpu data area is not yet setup, so we | ||
131 | * use a static array that is removed after the per_cpu data | ||
132 | * area is created. | ||
133 | */ | ||
134 | if (x86_cpu_to_apicid_ptr) { | ||
135 | u8 *x86_cpu_to_apicid = (u8 *)x86_cpu_to_apicid_ptr; | ||
136 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | ||
137 | } else { | ||
138 | per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid; | ||
139 | } | ||
127 | 140 | ||
128 | cpu_set(cpu, cpu_possible_map); | 141 | cpu_set(cpu, cpu_possible_map); |
129 | cpu_set(cpu, cpu_present_map); | 142 | cpu_set(cpu, cpu_present_map); |