]> err.no Git - linux-2.6/commitdiff
[PATCH] Move read_mostly definition to asm/cache.h
authorKyle McMartin <kyle@parisc-linux.org>
Thu, 23 Mar 2006 11:00:16 +0000 (03:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:10 +0000 (07:38 -0800)
Seems like needless clutter having a bunch of #if defined(CONFIG_$ARCH) in
include/linux/cache.h.  Move the per architecture section definition to
asm/cache.h, and keep the if-not-defined dummy case in linux/cache.h to
catch architectures which don't implement the section.

Verified that symbols still go in .data.read_mostly on parisc,
and the compile doesn't break.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-i386/cache.h
include/asm-ia64/cache.h
include/asm-parisc/cache.h
include/asm-sparc64/cache.h
include/asm-x86_64/cache.h
include/linux/cache.h

index 615911e5bd244e61a74ffe5d673054d6a7974a78..ca15c9c665cf68bf5a10dacd78a6e10624b0de38 100644 (file)
@@ -10,4 +10,6 @@
 #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
 
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
 #endif
index 40dd25195d656e0c171106a9735d931d7f0116e7..f0a104db8f20dcb5a37639ac26ffbf863fe4d8b3 100644 (file)
@@ -25,4 +25,6 @@
 # define SMP_CACHE_BYTES       (1 << 3)
 #endif
 
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
 #endif /* _ASM_IA64_CACHE_H */
index 93f179f13ce8141b7108e11afb28b7fef36cd64d..ae50f8e12eed8e54abe736ab6b7876087f611e19 100644 (file)
@@ -29,6 +29,8 @@
 
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
 extern void flush_data_cache_local(void *);  /* flushes local data-cache only */
 extern void flush_instruction_cache_local(void *); /* flushes local code-cache only */
 #ifdef CONFIG_SMP
index f7d35a2ae9b8a41401b73f70b74080080ddfcba4..e9df17acedde65d0dfcaddf2dffe1802f68354f1 100644 (file)
@@ -13,4 +13,6 @@
 #define        SMP_CACHE_BYTES_SHIFT   6
 #define        SMP_CACHE_BYTES         (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */
 
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
 #endif
index 263f0a211ed7b36880cba02eba00f8645e2054e5..c8043a16152e31fc52d3a48c32ae94ec2155eed9 100644 (file)
@@ -20,6 +20,8 @@
        __attribute__((__section__(".data.page_aligned")))
 #endif
 
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
 #endif
 
 #endif
index d22e632f41fb54e096da4822d64cc27749d7dad7..cc4b3aafad9a1fda984dbe6e08bfcd09d8b3b73f 100644 (file)
@@ -13,9 +13,7 @@
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 #endif
 
-#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) || defined(CONFIG_PARISC)
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
-#else
+#ifndef __read_mostly
 #define __read_mostly
 #endif