Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] Add __read_mostly support for powerpc

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Tony Breeds and committed by
Paul Mackerras
bd67fcf9 fc9069fe

+10
+6
arch/powerpc/kernel/vmlinux.lds.S
··· 7 7 #define PROVIDE32(x) PROVIDE(x) 8 8 #endif 9 9 #include <asm-generic/vmlinux.lds.h> 10 + #include <asm/cache.h> 10 11 11 12 ENTRY(_stext) 12 13 ··· 210 209 211 210 .data.cacheline_aligned : { 212 211 *(.data.cacheline_aligned) 212 + } 213 + 214 + . = ALIGN(L1_CACHE_BYTES); 215 + .data.read_mostly : { 216 + *(.data.read_mostly) 213 217 } 214 218 215 219 . = ALIGN(PAGE_SIZE);
+4
include/asm-powerpc/cache.h
··· 34 34 extern struct ppc64_caches ppc64_caches; 35 35 #endif /* __powerpc64__ && ! __ASSEMBLY__ */ 36 36 37 + #if !defined(__ASSEMBLY__) 38 + #define __read_mostly __attribute__((__section__(".data.read_mostly"))) 39 + #endif 40 + 37 41 #endif /* __KERNEL__ */ 38 42 #endif /* _ASM_POWERPC_CACHE_H */