cache.h 940 B

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