From: Tejun Heo Date: Fri, 16 Jan 2009 03:11:43 +0000 (+0900) Subject: x86_64: initialize this_cpu_off to __per_cpu_load X-Git-Tag: firefly_0821_release~13991^2~247^2~71 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd3adf52309867955d6e2175246b526442235805;p=firefly-linux-kernel-4.4.55.git 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 --- 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 @@ */ #include #include +#include +#ifdef CONFIG_X86_64 +DEFINE_PER_CPU(unsigned long, this_cpu_off) = (unsigned long)__per_cpu_load; +#else DEFINE_PER_CPU(unsigned long, this_cpu_off); +#endif EXPORT_PER_CPU_SYMBOL(this_cpu_off); #ifdef CONFIG_X86_32