Linux 2.6.16.22
[linux/fpc-iii.git] / include / asm-powerpc / cache.h
blob6379c2df5c40ff51830e32ecbffd55a949bd0b7a
1 #ifndef _ASM_POWERPC_CACHE_H
2 #define _ASM_POWERPC_CACHE_H
4 #ifdef __KERNEL__
6 #include <linux/config.h>
8 /* bytes per L1 cache line */
9 #if defined(CONFIG_8xx) || defined(CONFIG_403GCX)
10 #define L1_CACHE_SHIFT 4
11 #define MAX_COPY_PREFETCH 1
12 #elif defined(CONFIG_PPC32)
13 #define L1_CACHE_SHIFT 5
14 #define MAX_COPY_PREFETCH 4
15 #else /* CONFIG_PPC64 */
16 #define L1_CACHE_SHIFT 7
17 #endif
19 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
21 #define SMP_CACHE_BYTES L1_CACHE_BYTES
23 #if defined(__powerpc64__) && !defined(__ASSEMBLY__)
24 struct ppc64_caches {
25 u32 dsize; /* L1 d-cache size */
26 u32 dline_size; /* L1 d-cache line size */
27 u32 log_dline_size;
28 u32 dlines_per_page;
29 u32 isize; /* L1 i-cache size */
30 u32 iline_size; /* L1 i-cache line size */
31 u32 log_iline_size;
32 u32 ilines_per_page;
35 extern struct ppc64_caches ppc64_caches;
36 #endif /* __powerpc64__ && ! __ASSEMBLY__ */
38 #endif /* __KERNEL__ */
39 #endif /* _ASM_POWERPC_CACHE_H */