cache.h 563 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2017 Chen Liqin <liqin.chen@sunplusct.com>
  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. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  11. /*
  12. * RISC-V requires the stack pointer to be 16-byte aligned, so ensure that
  13. * the flat loader aligns it accordingly.
  14. */
  15. #ifndef CONFIG_MMU
  16. #define ARCH_SLAB_MINALIGN 16
  17. #endif
  18. #endif /* _ASM_RISCV_CACHE_H */