blob: 9348a13e73dab15b82cd3952999247c6d0128280 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Anton staafc6ecace2011-10-25 10:48:03 +00002/*
3 * Copyright (c) 2011 The Chromium OS Authors.
Anton staafc6ecace2011-10-25 10:48:03 +00004 */
5
6#ifndef __SANDBOX_CACHE_H__
7#define __SANDBOX_CACHE_H__
8
9/*
10 * For native compilation of the sandbox we should still align
11 * the contents of stack buffers to something reasonable. The
12 * GCC macro __BIGGEST_ALIGNMENT__ is defined to be the maximum
13 * required alignment for any basic type. This seems reasonable.
Tom Rinia1965e92016-03-05 14:07:44 -050014 * This is however GCC specific so if we don't have that available
15 * assume that 16 is large enough.
Anton staafc6ecace2011-10-25 10:48:03 +000016 */
Tom Rinia1965e92016-03-05 14:07:44 -050017#ifdef __BIGGEST_ALIGNMENT__
Anton staafc6ecace2011-10-25 10:48:03 +000018#define ARCH_DMA_MINALIGN __BIGGEST_ALIGNMENT__
Tom Rinia1965e92016-03-05 14:07:44 -050019#else
20#define ARCH_DMA_MINALIGN 16
21#endif
Tom Rini22e42682016-03-15 13:20:23 -040022#define CONFIG_SYS_CACHELINE_SIZE ARCH_DMA_MINALIGN
Anton staafc6ecace2011-10-25 10:48:03 +000023
24#endif /* __SANDBOX_CACHE_H__ */