cache.h 907 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License
  4. * as published by the Free Software Foundation; either version
  5. * 2 of the License, or (at your option) any later version.
  6. */
  7. #ifndef __ARCH_PPC64_CACHE_H
  8. #define __ARCH_PPC64_CACHE_H
  9. #include <asm/types.h>
  10. /* bytes per L1 cache line */
  11. #define L1_CACHE_SHIFT 7
  12. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  13. #define SMP_CACHE_BYTES L1_CACHE_BYTES
  14. #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */
  15. #ifndef __ASSEMBLY__
  16. struct ppc64_caches {
  17. u32 dsize; /* L1 d-cache size */
  18. u32 dline_size; /* L1 d-cache line size */
  19. u32 log_dline_size;
  20. u32 dlines_per_page;
  21. u32 isize; /* L1 i-cache size */
  22. u32 iline_size; /* L1 i-cache line size */
  23. u32 log_iline_size;
  24. u32 ilines_per_page;
  25. };
  26. extern struct ppc64_caches ppc64_caches;
  27. #endif
  28. #endif