xref: /OK3568_Linux_fs/u-boot/arch/sandbox/include/asm/cache.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2011 The Chromium OS Authors.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * SPDX-License-Identifier:	GPL-2.0+
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef __SANDBOX_CACHE_H__
8*4882a593Smuzhiyun #define __SANDBOX_CACHE_H__
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun /*
11*4882a593Smuzhiyun  * For native compilation of the sandbox we should still align
12*4882a593Smuzhiyun  * the contents of stack buffers to something reasonable.  The
13*4882a593Smuzhiyun  * GCC macro __BIGGEST_ALIGNMENT__ is defined to be the maximum
14*4882a593Smuzhiyun  * required alignment for any basic type.  This seems reasonable.
15*4882a593Smuzhiyun  * This is however GCC specific so if we don't have that available
16*4882a593Smuzhiyun  * assume that 16 is large enough.
17*4882a593Smuzhiyun  */
18*4882a593Smuzhiyun #ifdef __BIGGEST_ALIGNMENT__
19*4882a593Smuzhiyun #define ARCH_DMA_MINALIGN	__BIGGEST_ALIGNMENT__
20*4882a593Smuzhiyun #else
21*4882a593Smuzhiyun #define ARCH_DMA_MINALIGN	16
22*4882a593Smuzhiyun #endif
23*4882a593Smuzhiyun #define CONFIG_SYS_CACHELINE_SIZE	ARCH_DMA_MINALIGN
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #endif /* __SANDBOX_CACHE_H__ */
26