diff options
Diffstat (limited to 'arch/x86/kernel/head_64.S')
-rw-r--r-- | arch/x86/kernel/head_64.S | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 2f0ab0089883..7a995d0e9f78 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -245,10 +245,13 @@ ENTRY(secondary_startup_64) | |||
245 | 245 | ||
246 | /* Set up %gs. | 246 | /* Set up %gs. |
247 | * | 247 | * |
248 | * %gs should point to the pda. For initial boot, make %gs point | 248 | * On SMP, %gs should point to the per-cpu area. For initial |
249 | * to the _boot_cpu_pda in data section. For a secondary CPU, | 249 | * boot, make %gs point to the init data section. For a |
250 | * initial_gs should be set to its pda address before the CPU runs | 250 | * secondary CPU,initial_gs should be set to its pda address |
251 | * this code. | 251 | * before the CPU runs this code. |
252 | * | ||
253 | * On UP, initial_gs points to _boot_cpu_pda and doesn't | ||
254 | * change. | ||
252 | */ | 255 | */ |
253 | movl $MSR_GS_BASE,%ecx | 256 | movl $MSR_GS_BASE,%ecx |
254 | movq initial_gs(%rip),%rax | 257 | movq initial_gs(%rip),%rax |
@@ -278,7 +281,11 @@ ENTRY(secondary_startup_64) | |||
278 | ENTRY(initial_code) | 281 | ENTRY(initial_code) |
279 | .quad x86_64_start_kernel | 282 | .quad x86_64_start_kernel |
280 | ENTRY(initial_gs) | 283 | ENTRY(initial_gs) |
284 | #ifdef CONFIG_SMP | ||
285 | .quad __per_cpu_load | ||
286 | #else | ||
281 | .quad _boot_cpu_pda | 287 | .quad _boot_cpu_pda |
288 | #endif | ||
282 | __FINITDATA | 289 | __FINITDATA |
283 | 290 | ||
284 | ENTRY(stack_start) | 291 | ENTRY(stack_start) |