From: Christoph Lameter I tested the patch at the end of this message on x86_64 on top of rc4-mm1 and things worked okay. There was some overlap between other patches in mm and my patch. Signed-off-by: Andrew Morton --- arch/x86_64/kernel/vmlinux.lds.S | 3 +++ include/linux/cache.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff -puN arch/x86_64/kernel/vmlinux.lds.S~optimise-storage-of-read-mostly-variables-x86_64-fix-fix arch/x86_64/kernel/vmlinux.lds.S --- 25/arch/x86_64/kernel/vmlinux.lds.S~optimise-storage-of-read-mostly-variables-x86_64-fix-fix Thu May 12 13:22:42 2005 +++ 25-akpm/arch/x86_64/kernel/vmlinux.lds.S Thu May 12 13:24:25 2005 @@ -49,6 +49,9 @@ SECTIONS . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); .data.cacheline_aligned : { *(.data.cacheline_aligned) } + . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); + .data.mostly_readonly : { *(.data.mostly_readonly) } + #define AFTER(x) BINALIGN(LOADADDR(x) + SIZEOF(x), 16) #define BINALIGN(x,y) (((x) + (y) - 1) & ~((y) - 1)) #define CACHE_ALIGN(x) BINALIGN(x, CONFIG_X86_L1_CACHE_BYTES) diff -puN include/linux/cache.h~optimise-storage-of-read-mostly-variables-x86_64-fix-fix include/linux/cache.h --- 25/include/linux/cache.h~optimise-storage-of-read-mostly-variables-x86_64-fix-fix Thu May 12 13:22:42 2005 +++ 25-akpm/include/linux/cache.h Thu May 12 13:22:42 2005 @@ -25,7 +25,7 @@ #endif /* CONFIG_SMP */ #endif -#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) +#if defined(CONFIG_X86) #define __cacheline_aligned_mostly_readonly \ __attribute__((__aligned__(SMP_CACHE_BYTES), \ __section__(".data.mostly_readonly"))) _