diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic/ipi.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 7 |
3 files changed, 15 insertions, 8 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 126d5a3b00e9..ae08246f320c 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1248,6 +1248,14 @@ void __cpuinit setup_local_APIC(void) | |||
1248 | */ | 1248 | */ |
1249 | apic->init_apic_ldr(); | 1249 | apic->init_apic_ldr(); |
1250 | 1250 | ||
1251 | #ifdef CONFIG_X86_32 | ||
1252 | /* | ||
1253 | * APIC LDR is initialized. Fetch and store logical_apic_id. | ||
1254 | */ | ||
1255 | early_per_cpu(x86_cpu_to_logical_apicid, cpu) = | ||
1256 | logical_smp_processor_id(); | ||
1257 | #endif | ||
1258 | |||
1251 | /* | 1259 | /* |
1252 | * Set Task Priority to 'accept all'. We never change this | 1260 | * Set Task Priority to 'accept all'. We never change this |
1253 | * later on. | 1261 | * later on. |
diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index 5037736c460d..cce91bf26676 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c | |||
@@ -73,8 +73,8 @@ void default_send_IPI_mask_sequence_logical(const struct cpumask *mask, | |||
73 | local_irq_save(flags); | 73 | local_irq_save(flags); |
74 | for_each_cpu(query_cpu, mask) | 74 | for_each_cpu(query_cpu, mask) |
75 | __default_send_IPI_dest_field( | 75 | __default_send_IPI_dest_field( |
76 | apic->cpu_to_logical_apicid(query_cpu), vector, | 76 | early_per_cpu(x86_cpu_to_logical_apicid, query_cpu), |
77 | apic->dest_logical); | 77 | vector, apic->dest_logical); |
78 | local_irq_restore(flags); | 78 | local_irq_restore(flags); |
79 | } | 79 | } |
80 | 80 | ||
@@ -92,8 +92,8 @@ void default_send_IPI_mask_allbutself_logical(const struct cpumask *mask, | |||
92 | if (query_cpu == this_cpu) | 92 | if (query_cpu == this_cpu) |
93 | continue; | 93 | continue; |
94 | __default_send_IPI_dest_field( | 94 | __default_send_IPI_dest_field( |
95 | apic->cpu_to_logical_apicid(query_cpu), vector, | 95 | early_per_cpu(x86_cpu_to_logical_apicid, query_cpu), |
96 | apic->dest_logical); | 96 | vector, apic->dest_logical); |
97 | } | 97 | } |
98 | local_irq_restore(flags); | 98 | local_irq_restore(flags); |
99 | } | 99 | } |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index df934e46bf53..ca20f6bee3be 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -168,19 +168,18 @@ static void unmap_cpu_to_node(int cpu) | |||
168 | static void map_cpu_to_logical_apicid(void) | 168 | static void map_cpu_to_logical_apicid(void) |
169 | { | 169 | { |
170 | int cpu = smp_processor_id(); | 170 | int cpu = smp_processor_id(); |
171 | int apicid = logical_smp_processor_id(); | 171 | int logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu); |
172 | int node = apic->apicid_to_node(apicid); | 172 | int node; |
173 | 173 | ||
174 | node = apic->apicid_to_node(logical_apicid); | ||
174 | if (!node_online(node)) | 175 | if (!node_online(node)) |
175 | node = first_online_node; | 176 | node = first_online_node; |
176 | 177 | ||
177 | early_per_cpu(x86_cpu_to_logical_apicid, cpu) = apicid; | ||
178 | map_cpu_to_node(cpu, node); | 178 | map_cpu_to_node(cpu, node); |
179 | } | 179 | } |
180 | 180 | ||
181 | void numa_remove_cpu(int cpu) | 181 | void numa_remove_cpu(int cpu) |
182 | { | 182 | { |
183 | early_per_cpu(x86_cpu_to_logical_apicid, cpu) = BAD_APICID; | ||
184 | unmap_cpu_to_node(cpu); | 183 | unmap_cpu_to_node(cpu); |
185 | } | 184 | } |
186 | #else | 185 | #else |