diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-18 22:21:28 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-19 22:29:20 -0500 |
commit | 947e76cdc34c782fc947313d4331380686eebbad (patch) | |
tree | de5d424c4760269fd7800bc745e48b060c725300 /arch/x86/kernel/head_64.S | |
parent | 8c7e58e690ae60ab4215b025f433ed4af261e103 (diff) |
x86: move stack_canary into irq_stack
Impact: x86_64 percpu area layout change, irq_stack now at the beginning
Now that the PDA is empty except for the stack canary, it can be removed.
The irqstack is moved to the start of the per-cpu section. If the stack
protector is enabled, the canary overlaps the bottom 48 bytes of the irqstack.
tj: * updated subject
* dropped asm relocation of irq_stack_ptr
* updated comments a bit
* rebased on top of stack canary changes
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/head_64.S')
-rw-r--r-- | arch/x86/kernel/head_64.S | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 98ea26a2fca..a0a2b5ca9b7 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -242,13 +242,10 @@ ENTRY(secondary_startup_64) | |||
242 | 242 | ||
243 | /* Set up %gs. | 243 | /* Set up %gs. |
244 | * | 244 | * |
245 | * On SMP, %gs should point to the per-cpu area. For initial | 245 | * The base of %gs always points to the bottom of the irqstack |
246 | * boot, make %gs point to the init data section. For a | 246 | * union. If the stack protector canary is enabled, it is |
247 | * secondary CPU,initial_gs should be set to its pda address | 247 | * located at %gs:40. Note that, on SMP, the boot cpu uses |
248 | * before the CPU runs this code. | 248 | * init data section till per cpu areas are set up. |
249 | * | ||
250 | * On UP, initial_gs points to PER_CPU_VAR(__pda) and doesn't | ||
251 | * change. | ||
252 | */ | 249 | */ |
253 | movl $MSR_GS_BASE,%ecx | 250 | movl $MSR_GS_BASE,%ecx |
254 | movq initial_gs(%rip),%rax | 251 | movq initial_gs(%rip),%rax |
@@ -281,7 +278,7 @@ ENTRY(secondary_startup_64) | |||
281 | #ifdef CONFIG_SMP | 278 | #ifdef CONFIG_SMP |
282 | .quad __per_cpu_load | 279 | .quad __per_cpu_load |
283 | #else | 280 | #else |
284 | .quad PER_CPU_VAR(__pda) | 281 | .quad PER_CPU_VAR(irq_stack_union) |
285 | #endif | 282 | #endif |
286 | __FINITDATA | 283 | __FINITDATA |
287 | 284 | ||