- Kai Germaschewski: ISDN update (including Makefiles)
[davej-history.git] / include / linux / cache.h
blob2030eb72bd368a5f2160fb8b3d6368417fff76db
1 #ifndef __LINUX_CACHE_H
2 #define __LINUX_CACHE_H
4 #include <asm/cache.h>
6 #ifndef L1_CACHE_ALIGN
7 #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
8 #endif
10 #ifndef SMP_CACHE_BYTES
11 #define SMP_CACHE_BYTES L1_CACHE_BYTES
12 #endif
14 #ifndef ____cacheline_aligned
15 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
16 #endif
18 #ifndef __cacheline_aligned
19 #ifdef MODULE
20 #define __cacheline_aligned ____cacheline_aligned
21 #else
22 #define __cacheline_aligned \
23 __attribute__((__aligned__(SMP_CACHE_BYTES), \
24 __section__(".data.cacheline_aligned")))
25 #endif
26 #endif /* __cacheline_aligned */
28 #endif /* __LINUX_CACHE_H */