mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
804f1594cc
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>
19 lines
530 B
C
19 lines
530 B
C
/*
|
|
* include/asm-sparc64/cache.h
|
|
*/
|
|
#ifndef __ARCH_SPARC64_CACHE_H
|
|
#define __ARCH_SPARC64_CACHE_H
|
|
|
|
/* bytes per L1 cache line */
|
|
#define L1_CACHE_SHIFT 5
|
|
#define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */
|
|
|
|
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
|
|
|
|
#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
|