diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/cache.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/cache.h')
-rw-r--r-- | include/linux/cache.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/linux/cache.h b/include/linux/cache.h new file mode 100644 index 000000000000..4d767b93738a --- /dev/null +++ b/include/linux/cache.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef __LINUX_CACHE_H | ||
2 | #define __LINUX_CACHE_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/config.h> | ||
6 | #include <asm/cache.h> | ||
7 | |||
8 | #ifndef L1_CACHE_ALIGN | ||
9 | #define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) | ||
10 | #endif | ||
11 | |||
12 | #ifndef SMP_CACHE_BYTES | ||
13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
14 | #endif | ||
15 | |||
16 | #ifndef ____cacheline_aligned | ||
17 | #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) | ||
18 | #endif | ||
19 | |||
20 | #ifndef ____cacheline_aligned_in_smp | ||
21 | #ifdef CONFIG_SMP | ||
22 | #define ____cacheline_aligned_in_smp ____cacheline_aligned | ||
23 | #else | ||
24 | #define ____cacheline_aligned_in_smp | ||
25 | #endif /* CONFIG_SMP */ | ||
26 | #endif | ||
27 | |||
28 | #ifndef __cacheline_aligned | ||
29 | #define __cacheline_aligned \ | ||
30 | __attribute__((__aligned__(SMP_CACHE_BYTES), \ | ||
31 | __section__(".data.cacheline_aligned"))) | ||
32 | #endif /* __cacheline_aligned */ | ||
33 | |||
34 | #ifndef __cacheline_aligned_in_smp | ||
35 | #ifdef CONFIG_SMP | ||
36 | #define __cacheline_aligned_in_smp __cacheline_aligned | ||
37 | #else | ||
38 | #define __cacheline_aligned_in_smp | ||
39 | #endif /* CONFIG_SMP */ | ||
40 | #endif | ||
41 | |||
42 | #if !defined(____cacheline_maxaligned_in_smp) | ||
43 | #if defined(CONFIG_SMP) | ||
44 | #define ____cacheline_maxaligned_in_smp \ | ||
45 | __attribute__((__aligned__(1 << (L1_CACHE_SHIFT_MAX)))) | ||
46 | #else | ||
47 | #define ____cacheline_maxaligned_in_smp | ||
48 | #endif | ||
49 | #endif | ||
50 | |||
51 | #endif /* __LINUX_CACHE_H */ | ||