cache.h 602 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __ASM_SH_CACHE_H
  2. #define __ASM_SH_CACHE_H
  3. #if defined(CONFIG_CPU_SH4)
  4. #define L1_CACHE_BYTES 32
  5. struct __large_struct { unsigned long buf[100]; };
  6. #define __m(x) (*(struct __large_struct *)(x))
  7. #else
  8. /*
  9. * 32-bytes is the largest L1 data cache line size for SH the architecture. So
  10. * it is a safe default for DMA alignment.
  11. */
  12. #define ARCH_DMA_MINALIGN 32
  13. #endif /* CONFIG_CPU_SH4 */
  14. /*
  15. * Use the L1 data cache line size value for the minimum DMA buffer alignment
  16. * on SH.
  17. */
  18. #ifndef ARCH_DMA_MINALIGN
  19. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  20. #endif
  21. #endif /* __ASM_SH_CACHE_H */