x86/xen: resume timer irqs early
[linux/fpc-iii.git] / arch / arc / include / asm / barrier.h
blobf6cb7c4ffb35029316d2c549c2a6db5d95f86e0e
1 /*
2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef __ASM_BARRIER_H
10 #define __ASM_BARRIER_H
12 #ifndef __ASSEMBLY__
14 /* TODO-vineetg: Need to see what this does, don't we need sync anywhere */
15 #define mb() __asm__ __volatile__ ("" : : : "memory")
16 #define rmb() mb()
17 #define wmb() mb()
18 #define set_mb(var, value) do { var = value; mb(); } while (0)
19 #define set_wmb(var, value) do { var = value; wmb(); } while (0)
20 #define read_barrier_depends() mb()
22 /* TODO-vineetg verify the correctness of macros here */
23 #ifdef CONFIG_SMP
24 #define smp_mb() mb()
25 #define smp_rmb() rmb()
26 #define smp_wmb() wmb()
27 #else
28 #define smp_mb() barrier()
29 #define smp_rmb() barrier()
30 #define smp_wmb() barrier()
31 #endif
33 #define smp_mb__before_atomic_dec() barrier()
34 #define smp_mb__after_atomic_dec() barrier()
35 #define smp_mb__before_atomic_inc() barrier()
36 #define smp_mb__after_atomic_inc() barrier()
38 #define smp_read_barrier_depends() do { } while (0)
40 #endif
42 #endif