cache.h 601 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2017 Chen Liqin <[email protected]>
  4. * Copyright (C) 2012 Regents of the University of California
  5. */
  6. #ifndef _ASM_RISCV_CACHE_H
  7. #define _ASM_RISCV_CACHE_H
  8. #define L1_CACHE_SHIFT 6
  9. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  10. #ifdef CONFIG_RISCV_DMA_NONCOHERENT
  11. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  12. #endif
  13. /*
  14. * RISC-V requires the stack pointer to be 16-byte aligned, so ensure that
  15. * the flat loader aligns it accordingly.
  16. */
  17. #ifndef CONFIG_MMU
  18. #define ARCH_SLAB_MINALIGN 16
  19. #endif
  20. #endif /* _ASM_RISCV_CACHE_H */