blob: 5822b0a52c0e2fc059f1b49809e4372b513c4a4c [file] [log] [blame]
wdenkb783eda2003-06-25 22:26:29 +00001/*
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
wdenkb783eda2003-06-25 22:26:29 +000019#ifdef CONFIG_SMP
20#error SMP not supported
21#endif
22
Vasili Galka7d899822014-06-10 16:16:14 +030023#include <asm/proc-armv/system.h>
Chris Packham4d9f7a02018-09-08 21:39:05 +120024#include <asm-generic/atomic.h>
Adam Oleksy59a51a12016-09-13 08:40:58 +020025
wdenkb783eda2003-06-25 22:26:29 +000026/* 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