Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Anton staaf | c6ecace | 2011-10-25 10:48:03 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2011 The Chromium OS Authors. |
Anton staaf | c6ecace | 2011-10-25 10:48:03 +0000 | [diff] [blame] | 4 | */ |
| 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 Rini | a1965e9 | 2016-03-05 14:07:44 -0500 | [diff] [blame] | 14 | * This is however GCC specific so if we don't have that available |
| 15 | * assume that 16 is large enough. |
Anton staaf | c6ecace | 2011-10-25 10:48:03 +0000 | [diff] [blame] | 16 | */ |
Tom Rini | a1965e9 | 2016-03-05 14:07:44 -0500 | [diff] [blame] | 17 | #ifdef __BIGGEST_ALIGNMENT__ |
Anton staaf | c6ecace | 2011-10-25 10:48:03 +0000 | [diff] [blame] | 18 | #define ARCH_DMA_MINALIGN __BIGGEST_ALIGNMENT__ |
Tom Rini | a1965e9 | 2016-03-05 14:07:44 -0500 | [diff] [blame] | 19 | #else |
| 20 | #define ARCH_DMA_MINALIGN 16 |
| 21 | #endif |
Anton staaf | c6ecace | 2011-10-25 10:48:03 +0000 | [diff] [blame] | 22 | |
| 23 | #endif /* __SANDBOX_CACHE_H__ */ |