xref: /openbmc/u-boot/arch/arm/include/asm/atomic.h (revision 4c0411eb)
1 /*
2  *  linux/include/asm-arm/atomic.h
3  *
4  *  Copyright (c) 1996 Russell King.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  *  Changelog:
11  *   27-06-1996	RMK	Created
12  *   13-04-1997	RMK	Made functions atomic!
13  *   07-12-1997	RMK	Upgraded for v2.1.
14  *   26-08-1998	PJB	Added #ifdef __KERNEL__
15  */
16 #ifndef __ASM_ARM_ATOMIC_H
17 #define __ASM_ARM_ATOMIC_H
18 
19 #ifdef CONFIG_SMP
20 #error SMP not supported
21 #endif
22 
23 #include <asm/proc-armv/system.h>
24 #include <asm-generic/atomic.h>
25 
26 /* Atomic operations are already serializing on ARM */
27 #define smp_mb__before_atomic_dec()	barrier()
28 #define smp_mb__after_atomic_dec()	barrier()
29 #define smp_mb__before_atomic_inc()	barrier()
30 #define smp_mb__after_atomic_inc()	barrier()
31 
32 #endif
33