cache.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * include/asm-parisc/cache.h
  3. */
  4. #ifndef __ARCH_PARISC_CACHE_H
  5. #define __ARCH_PARISC_CACHE_H
  6. /*
  7. * PA 2.0 processors have 64 and 128-byte L2 cachelines; PA 1.1 processors
  8. * have 32-byte cachelines. The L1 length appears to be 16 bytes but this
  9. * is not clearly documented.
  10. */
  11. #define L1_CACHE_BYTES 16
  12. #define L1_CACHE_SHIFT 4
  13. #ifndef __ASSEMBLY__
  14. #define SMP_CACHE_BYTES L1_CACHE_BYTES
  15. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  16. #define __read_mostly __attribute__((__section__(".data..read_mostly")))
  17. void parisc_cache_init(void); /* initializes cache-flushing */
  18. void disable_sr_hashing_asm(int); /* low level support for above */
  19. void disable_sr_hashing(void); /* turns off space register hashing */
  20. void free_sid(unsigned long);
  21. unsigned long alloc_sid(void);
  22. struct seq_file;
  23. extern void show_cache_info(struct seq_file *m);
  24. extern int split_tlb;
  25. extern int dcache_stride;
  26. extern int icache_stride;
  27. extern struct pdc_cache_info cache_info;
  28. void parisc_setup_cache_timing(void);
  29. #define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr));
  30. #define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr));
  31. #define pdtlb_kernel(addr) asm volatile("pdtlb 0(%0)" : : "r" (addr));
  32. #endif /* ! __ASSEMBLY__ */
  33. /* Classes of processor wrt: disabling space register hashing */
  34. #define SRHASH_PCXST 0 /* pcxs, pcxt, pcxt_ */
  35. #define SRHASH_PCXL 1 /* pcxl */
  36. #define SRHASH_PA20 2 /* pcxu, pcxu_, pcxw, pcxw_ */
  37. #endif