diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 17:40:40 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 17:40:40 -0800 |
| commit | 7a2deb32924142696b8174cdf9b38cd72a11fc96 (patch) | |
| tree | 8ecc18f81fdb849254f39dc2e9fd77253319e1ec /include/linux/cache.h | |
Import changeset
Diffstat (limited to 'include/linux/cache.h')
| -rw-r--r-- | include/linux/cache.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/cache.h b/include/linux/cache.h new file mode 100644 index 000000000000..2030eb72bd36 --- /dev/null +++ b/include/linux/cache.h @@ -0,0 +1,28 @@ +#ifndef __LINUX_CACHE_H +#define __LINUX_CACHE_H + +#include <asm/cache.h> + +#ifndef L1_CACHE_ALIGN +#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) +#endif + +#ifndef SMP_CACHE_BYTES +#define SMP_CACHE_BYTES L1_CACHE_BYTES +#endif + +#ifndef ____cacheline_aligned +#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) +#endif + +#ifndef __cacheline_aligned +#ifdef MODULE +#define __cacheline_aligned ____cacheline_aligned +#else +#define __cacheline_aligned \ + __attribute__((__aligned__(SMP_CACHE_BYTES), \ + __section__(".data.cacheline_aligned"))) +#endif +#endif /* __cacheline_aligned */ + +#endif /* __LINUX_CACHE_H */ |
