x86: make percpu symbols zerobased on SMP
[cascardo/linux.git] / arch / x86 / kernel / head64.c
index 388e05a..bc2900c 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/trampoline.h>
 
 /* boot cpu pda */
-static struct x8664_pda _boot_cpu_pda __read_mostly;
+static struct x8664_pda _boot_cpu_pda;
 
 #ifdef CONFIG_SMP
 /*
@@ -44,6 +44,8 @@ void __init x86_64_init_pda(void)
 {
        _cpu_pda = __cpu_pda;
        cpu_pda(0) = &_boot_cpu_pda;
+       cpu_pda(0)->data_offset =
+               (unsigned long)(__per_cpu_load - __per_cpu_start);
        pda_init(0);
 }