--- arch/x86/Kconfig | 5 +++++ arch/x86/kernel/setup64.c | 4 ++-- arch/x86/kernel/vmlinux_64.lds.S | 1 + include/asm-x86/percpu.h | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) Index: linux-2.6.24-rc3-mm2/arch/x86/kernel/vmlinux_64.lds.S =================================================================== --- linux-2.6.24-rc3-mm2.orig/arch/x86/kernel/vmlinux_64.lds.S 2007-11-28 22:04:08.790558258 -0800 +++ linux-2.6.24-rc3-mm2/arch/x86/kernel/vmlinux_64.lds.S 2007-11-28 22:05:33.834558397 -0800 @@ -16,6 +16,7 @@ jiffies_64 = jiffies; _proxy_pda = 1; PHDRS { text PT_LOAD FLAGS(5); /* R_E */ + percpu PT_LOAD FLAGS(4); /* R__ */ data PT_LOAD FLAGS(7); /* RWE */ user PT_LOAD FLAGS(7); /* RWE */ data.init PT_LOAD FLAGS(7); /* RWE */ Index: linux-2.6.24-rc3-mm2/arch/x86/Kconfig =================================================================== --- linux-2.6.24-rc3-mm2.orig/arch/x86/Kconfig 2007-11-28 22:04:08.820058483 -0800 +++ linux-2.6.24-rc3-mm2/arch/x86/Kconfig 2007-11-28 22:05:33.834558397 -0800 @@ -123,6 +123,11 @@ config GENERIC_TIME_VSYSCALL config ARCH_SETS_UP_PER_CPU_AREA def_bool X86_64 +config PERCPU_ZERO_BASED + bool + depends on X86_64 && SMP + default y + config ZONE_DMA32 bool default X86_64 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 22:05:14.286558260 -0800 +++ linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c 2007-11-28 22:05:33.834558397 -0800 @@ -111,11 +111,11 @@ void __init setup_per_cpu_areas(void) } if (!ptr) panic("Cannot allocate cpu data for CPU %d\n", i); - memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); + memcpy(ptr, __per_cpu_load, __per_cpu_size); /* Relocate the pda */ memcpy(ptr, cpu_pda(i), sizeof(struct x8664_pda)); cpu_pda(i) = (struct x8664_pda *)ptr; - cpu_pda(i)->data_offset = ptr - __per_cpu_start; + cpu_pda(i)->data_offset = (unsigned long)ptr; } /* Fix up pda for this processor .... */ pda_init(0); Index: linux-2.6.24-rc3-mm2/include/asm-x86/percpu.h =================================================================== --- linux-2.6.24-rc3-mm2.orig/include/asm-x86/percpu.h 2007-11-28 22:05:15.091808470 -0800 +++ linux-2.6.24-rc3-mm2/include/asm-x86/percpu.h 2007-11-28 22:05:36.134558173 -0800 @@ -18,7 +18,7 @@ #define per_cpu_offset(x) (__per_cpu_offset(x)) #define __percpu_seg "%%gs:" /* Calculate the offset to use with the segment register */ -#define seg_offset(name) (*SHIFT_PTR(&per_cpu_var(name), - (unsigned long)__per_cpu_start)) +#define seg_offset(name) per_cpu_var(name) #else #define __percpu_seg ""