aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJungseok Lee <jungseoklee85@gmail.com>2014-12-02 12:49:24 -0500
committerWill Deacon <will.deacon@arm.com>2014-12-03 05:19:35 -0500
commite4f88d833bec29b8e6fadc1b2488f0c6370935e1 (patch)
treee4062286dd04734147b5901d3d1e86bd7cacdb1c
parenta2d25a5391ca219f196f9fee7b535c40d201c6bf (diff)
arm64: Implement support for read-mostly sections
As putting data which is read mostly together, we can avoid unnecessary cache line bouncing. Other architectures, such as ARM and x86, adopted the same idea. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Jungseok Lee <jungseoklee85@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/include/asm/cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h
index 88cc05b5f3ac..bde449936e2f 100644
--- a/arch/arm64/include/asm/cache.h
+++ b/arch/arm64/include/asm/cache.h
@@ -32,6 +32,8 @@
32 32
33#ifndef __ASSEMBLY__ 33#ifndef __ASSEMBLY__
34 34
35#define __read_mostly __attribute__((__section__(".data..read_mostly")))
36
35static inline int cache_line_size(void) 37static inline int cache_line_size(void)
36{ 38{
37 u32 cwg = cache_type_cwg(); 39 u32 cwg = cache_type_cwg();