diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-02-08 09:58:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 04:30:30 -0500 |
commit | 2add8e235cbe0dcd672c33fc322754e15500238c (patch) | |
tree | 3cf9abe886432ac82fc08e99241ec7254dc20193 /arch/x86/kernel/cpu/common.c | |
parent | d3770449d3cb058b94ca1d050d5ced4a66c75ce4 (diff) |
x86: use linker to offset symbols by __per_cpu_load
Impact: cleanup and bug fix
Use the linker to create symbols for certain per-cpu variables
that are offset by __per_cpu_load. This allows the removal of
the runtime fixup of the GDT pointer, which fixes a bug with
resume reported by Jiri Slaby.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 0f73ea423089..41b0de6df873 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -902,12 +902,8 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; | |||
902 | 902 | ||
903 | DEFINE_PER_CPU_FIRST(union irq_stack_union, | 903 | DEFINE_PER_CPU_FIRST(union irq_stack_union, |
904 | irq_stack_union) __aligned(PAGE_SIZE); | 904 | irq_stack_union) __aligned(PAGE_SIZE); |
905 | #ifdef CONFIG_SMP | ||
906 | DEFINE_PER_CPU(char *, irq_stack_ptr); /* will be set during per cpu init */ | ||
907 | #else | ||
908 | DEFINE_PER_CPU(char *, irq_stack_ptr) = | 905 | DEFINE_PER_CPU(char *, irq_stack_ptr) = |
909 | per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; | 906 | init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; |
910 | #endif | ||
911 | 907 | ||
912 | DEFINE_PER_CPU(unsigned long, kernel_stack) = | 908 | DEFINE_PER_CPU(unsigned long, kernel_stack) = |
913 | (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE; | 909 | (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE; |