Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
| 6 | * Copyright (C) 2001 - 2012 Tensilica Inc. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _XTENSA_SYSTEM_H |
| 10 | #define _XTENSA_SYSTEM_H |
| 11 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 12 | #include <asm/core.h> |
| 13 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 14 | #define mb() ({ __asm__ __volatile__("memw" : : : "memory"); }) |
| 15 | #define rmb() barrier() |
| 16 | #define wmb() mb() |
| 17 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 18 | #if XCHAL_HAVE_S32C1I |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 19 | #define __smp_mb__before_atomic() barrier() |
| 20 | #define __smp_mb__after_atomic() barrier() |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 21 | #endif |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 22 | |
| 23 | #include <asm-generic/barrier.h> |
| 24 | |
| 25 | #endif /* _XTENSA_SYSTEM_H */ |