From: Christoph Lameter Date: Mon, 12 Dec 2005 17:34:32 +0000 (-0800) Subject: [IA64] Add __read_mostly support for IA64 X-Git-Tag: MMI-PSA29.97-13-9~52596^2~36^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc86e88c2bb8a7603ee175fbb6a9e92cf3293dd8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [IA64] Add __read_mostly support for IA64 sparc64, i386 and x86_64 have support for a special data section dedicated to rarely updated data that is frequently read. The section was created to avoid false sharing of those rarely read data with frequently written kernel data. This patch creates such a data section for ia64 and will group rarely written data into this section. Signed-off-by: Christoph Lameter Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 30d8564e9603..73af6267d2ef 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S @@ -177,6 +177,9 @@ SECTIONS } . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */ + .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) + { *(.data.read_mostly) } + .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { *(.data.cacheline_aligned) } diff --git a/include/linux/cache.h b/include/linux/cache.h index f6b5a46c5f82..0b7ecf3af78a 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -13,7 +13,7 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif -#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) +#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) #define __read_mostly __attribute__((__section__(".data.read_mostly"))) #else #define __read_mostly