summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Borntraeger <cborntra@de.ibm.com>2006-04-28 03:40:24 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-28 17:33:48 +0200
commit58268b97f679108d32a882a7fc029585da801975 (patch)
tree5b416785ab2fc75f5f26f56863b96329e274fe08
parent[PATCH] s390: instruction processing damage handling (diff)
downloadlinux-58268b97f679108d32a882a7fc029585da801975.tar.xz
linux-58268b97f679108d32a882a7fc029585da801975.zip
[PATCH] s390: add read_mostly optimization
Add a read_mostly section and define __read_mostly to prevent cache line pollution due to writes for mostly read variables. In addition fix the incorrect alignment of the cache_line_aligned data section. s390 has a cacheline size of 256 bytes. Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/s390/kernel/vmlinux.lds.S4
-rw-r--r--include/asm-s390/cache.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 9289face3027..9f34bb54c051 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -58,9 +58,11 @@ SECTIONS
. = ALIGN(4096);
.data.page_aligned : { *(.data.idt) }
- . = ALIGN(32);
+ . = ALIGN(256);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
+ . = ALIGN(256);
+ .data.read_mostly : { *(.data.read_mostly) }
_edata = .; /* End of data section */
. = ALIGN(8192); /* init_task */
diff --git a/include/asm-s390/cache.h b/include/asm-s390/cache.h
index e20cdd9074db..cdf431b061bb 100644
--- a/include/asm-s390/cache.h
+++ b/include/asm-s390/cache.h
@@ -16,4 +16,6 @@
#define ARCH_KMALLOC_MINALIGN 8
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
#endif