--- arch/ia64/kernel/vmlinux.lds.S | 10 +--------- include/asm-generic/vmlinux.lds.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) Index: linux-2.6/arch/ia64/kernel/vmlinux.lds.S =================================================================== --- linux-2.6.orig/arch/ia64/kernel/vmlinux.lds.S 2007-11-13 21:28:56.000000000 -0800 +++ linux-2.6/arch/ia64/kernel/vmlinux.lds.S 2007-11-13 21:39:03.000000000 -0800 @@ -208,15 +208,7 @@ SECTIONS /* Per-cpu data: */ percpu : { } :percpu - . = ALIGN(PERCPU_PAGE_SIZE); - __phys_per_cpu_start = .; - .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) - { - __per_cpu_start = .; - *(.data.percpu) - *(.data.percpu.shared_aligned) - __per_cpu_end = .; - } + VIRT_PERCPU(PERCPU_ADDR, PERCPU_PAGE_SIZE) . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits * into percpu page size */ Index: linux-2.6/include/asm-generic/vmlinux.lds.h =================================================================== --- linux-2.6.orig/include/asm-generic/vmlinux.lds.h 2007-11-13 21:29:25.000000000 -0800 +++ linux-2.6/include/asm-generic/vmlinux.lds.h 2007-11-13 21:40:32.000000000 -0800 @@ -263,3 +263,16 @@ *(.data.percpu.shared_aligned) \ } \ __per_cpu_end = .; + +#define VIRT_PERCPU(vaddr, align) \ + . = ALIGN(align); \ + __phys_per_cpu_start = .; \ + .data.percpu vaddr : AT(__phys_per_cpu_start - LOAD_OFFSET) { \ + __per_cpu_start = .; \ + *(.data.percpu) \ + *(.data.percpu.shared_aligned) \ + __per_cpu_end = .; \ + } \ + . = ALIGN(align); \ + __phys_per_cpu_end = . +