wdenk | b783eda | 2003-06-25 22:26:29 +0000 | [diff] [blame] | 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 | |
wdenk | b783eda | 2003-06-25 22:26:29 +0000 | [diff] [blame] | 19 | #ifdef CONFIG_SMP |
| 20 | #error SMP not supported |
| 21 | #endif |
| 22 | |
Vasili Galka | 7d89982 | 2014-06-10 16:16:14 +0300 | [diff] [blame] | 23 | #include <asm/proc-armv/system.h> |
Chris Packham | 4d9f7a0 | 2018-09-08 21:39:05 +1200 | [diff] [blame] | 24 | #include <asm-generic/atomic.h> |
Adam Oleksy | 59a51a1 | 2016-09-13 08:40:58 +0200 | [diff] [blame] | 25 | |
wdenk | b783eda | 2003-06-25 22:26:29 +0000 | [diff] [blame] | 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 |