Remove _cpu_pda() pda->dataoffset = cpu_pda(cpu) - __per_cpu_start We could now setup __per_cpu_offset[i] = cpu_pda(cpu) - __per_cpu_start Thus cpu_pda(cpu) = __per_cpu_offset[i] + __per_cpu_start --- arch/x86/kernel/head64.c | 2 +- arch/x86/kernel/setup64.c | 3 --- include/asm-x86/pda.h | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) Index: linux-2.6.24-rc3-mm2/arch/x86/kernel/head64.c =================================================================== --- linux-2.6.24-rc3-mm2.orig/arch/x86/kernel/head64.c 2007-11-28 17:21:32.504440349 -0800 +++ linux-2.6.24-rc3-mm2/arch/x86/kernel/head64.c 2007-11-28 17:23:01.620940300 -0800 @@ -71,7 +71,7 @@ void __init x86_64_start_kernel(char * r early_printk("Kernel alive\n"); for (i = 0; i < NR_CPUS; i++) - cpu_pda(i) = &boot_cpu_pda[i]; + __per_cpu_offset[i] = ((char *)&boot_cpu_pda[i]) - __per_cpu_start; pda_init(0); copy_bootdata(__va(real_mode_data)); Index: linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c =================================================================== --- linux-2.6.24-rc3-mm2.orig/arch/x86/kernel/setup64.c 2007-11-28 17:21:32.504440349 -0800 +++ linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c 2007-11-28 17:23:01.624939787 -0800 @@ -28,9 +28,6 @@ struct boot_params __initdata boot_param cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; -struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly; -EXPORT_SYMBOL(_cpu_pda); - DEFINE_PER_CPU_FIRST(struct x8664_pda, pda); EXPORT_PER_CPU_SYMBOL(pda); Index: linux-2.6.24-rc3-mm2/include/asm-x86/pda.h =================================================================== --- linux-2.6.24-rc3-mm2.orig/include/asm-x86/pda.h 2007-11-28 17:22:21.282002897 -0800 +++ linux-2.6.24-rc3-mm2/include/asm-x86/pda.h 2007-11-28 17:23:45.384465744 -0800 @@ -41,7 +41,7 @@ struct x8664_pda { extern struct x8664_pda *_cpu_pda[]; extern void pda_init(int); -#define cpu_pda(i) (_cpu_pda[i]) +#define cpu_pda(i) ((struct x8664_pda *)(__per_cpu_start + __per_cpu_offset[i])) /* * There is no fast way to get the base address of the PDA, all the accesses