• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * linux/arch/unicore32/include/asm/cache.h
4  *
5  * Code specific to PKUnity SoC and UniCore ISA
6  *
7  * Copyright (C) 2001-2010 GUAN Xue-tao
8  */
9 #ifndef __UNICORE_CACHE_H__
10 #define __UNICORE_CACHE_H__
11 
12 #define L1_CACHE_SHIFT		(5)
13 #define L1_CACHE_BYTES		(1 << L1_CACHE_SHIFT)
14 
15 /*
16  * Memory returned by kmalloc() may be used for DMA, so we must make
17  * sure that all such allocations are cache aligned. Otherwise,
18  * unrelated code may cause parts of the buffer to be read into the
19  * cache before the transfer is done, causing old data to be seen by
20  * the CPU.
21  */
22 #define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
23 
24 #endif
25