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