diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-18 10:38:58 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-18 10:38:58 -0500 |
commit | 9af45651f1f7c89942e016a1a00a7ebddfa727f8 (patch) | |
tree | a22617474a2a62bc816b97c9156c5a2fc9a566b3 /arch/x86/kernel/cpu/common.c | |
parent | c6f5e0acd5d12ee23f701f15889872e67b47caa6 (diff) |
x86-64: Move kernelstack from PDA to per-cpu.
Also clean up PER_CPU_VAR usage in xen-asm_64.S
tj: * remove now unused stack_thread_info()
* s/kernelstack/kernel_stack/
* added FIXME comment in xen-asm_64.S
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index b50e38d16888..06b6290088f4 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -889,6 +889,10 @@ DEFINE_PER_CPU(char *, irq_stack_ptr) = | |||
889 | per_cpu_var(irq_stack) + IRQ_STACK_SIZE - 64; | 889 | per_cpu_var(irq_stack) + IRQ_STACK_SIZE - 64; |
890 | #endif | 890 | #endif |
891 | 891 | ||
892 | DEFINE_PER_CPU(unsigned long, kernel_stack) = | ||
893 | (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE; | ||
894 | EXPORT_PER_CPU_SYMBOL(kernel_stack); | ||
895 | |||
892 | void __cpuinit pda_init(int cpu) | 896 | void __cpuinit pda_init(int cpu) |
893 | { | 897 | { |
894 | struct x8664_pda *pda = cpu_pda(cpu); | 898 | struct x8664_pda *pda = cpu_pda(cpu); |
@@ -900,8 +904,6 @@ void __cpuinit pda_init(int cpu) | |||
900 | load_pda_offset(cpu); | 904 | load_pda_offset(cpu); |
901 | 905 | ||
902 | pda->irqcount = -1; | 906 | pda->irqcount = -1; |
903 | pda->kernelstack = (unsigned long)stack_thread_info() - | ||
904 | PDA_STACKOFFSET + THREAD_SIZE; | ||
905 | 907 | ||
906 | if (cpu != 0) { | 908 | if (cpu != 0) { |
907 | if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE) | 909 | if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE) |