blob: a545e4b2a1f9cddfd41b6da78d15e4d7a174f9a7 [file] [log] [blame]
Anton staafcceea662011-10-25 10:48:03 +00001/*
2 * Copyright (c) 2011 The Chromium OS Authors.
Anton staafcceea662011-10-25 10:48:03 +00003 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Anton staafcceea662011-10-25 10:48:03 +00005 */
6
7#ifndef __SANDBOX_CACHE_H__
8#define __SANDBOX_CACHE_H__
9
10/*
11 * For native compilation of the sandbox we should still align
12 * the contents of stack buffers to something reasonable. The
13 * GCC macro __BIGGEST_ALIGNMENT__ is defined to be the maximum
14 * required alignment for any basic type. This seems reasonable.
Tom Rini699946a2016-03-05 14:07:44 -050015 * This is however GCC specific so if we don't have that available
16 * assume that 16 is large enough.
Anton staafcceea662011-10-25 10:48:03 +000017 */
Tom Rini699946a2016-03-05 14:07:44 -050018#ifdef __BIGGEST_ALIGNMENT__
Anton staafcceea662011-10-25 10:48:03 +000019#define ARCH_DMA_MINALIGN __BIGGEST_ALIGNMENT__
Tom Rini699946a2016-03-05 14:07:44 -050020#else
21#define ARCH_DMA_MINALIGN 16
22#endif
Tom Rini690d8a92016-03-15 13:20:23 -040023#define CONFIG_SYS_CACHELINE_SIZE ARCH_DMA_MINALIGN
Anton staafcceea662011-10-25 10:48:03 +000024
25#endif /* __SANDBOX_CACHE_H__ */