diff options
author | Tejun Heo <tj@kernel.org> | 2009-01-15 22:11:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-16 08:20:58 -0500 |
commit | cd3adf52309867955d6e2175246b526442235805 (patch) | |
tree | 7b64648450dc39d9662d09923fab7fd1e9c47da8 | |
parent | a338af2c648f5e07c582154745a6c60cd2d8bf12 (diff) |
x86_64: initialize this_cpu_off to __per_cpu_load
On x86_64, if get_per_cpu_var() is used before per cpu area is setup
(if lockdep is turned on, it happens), it needs this_cpu_off to point
to __per_cpu_load. Initialize accordingly.
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | arch/x86/kernel/smpcommon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpcommon.c b/arch/x86/kernel/smpcommon.c index 84395fabc410..7e157810062f 100644 --- a/arch/x86/kernel/smpcommon.c +++ b/arch/x86/kernel/smpcommon.c | |||
@@ -3,8 +3,13 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <asm/smp.h> | 5 | #include <asm/smp.h> |
6 | #include <asm/sections.h> | ||
6 | 7 | ||
8 | #ifdef CONFIG_X86_64 | ||
9 | DEFINE_PER_CPU(unsigned long, this_cpu_off) = (unsigned long)__per_cpu_load; | ||
10 | #else | ||
7 | DEFINE_PER_CPU(unsigned long, this_cpu_off); | 11 | DEFINE_PER_CPU(unsigned long, this_cpu_off); |
12 | #endif | ||
8 | EXPORT_PER_CPU_SYMBOL(this_cpu_off); | 13 | EXPORT_PER_CPU_SYMBOL(this_cpu_off); |
9 | 14 | ||
10 | #ifdef CONFIG_X86_32 | 15 | #ifdef CONFIG_X86_32 |