diff options
Diffstat (limited to 'include/asm-alpha/system.h')
-rw-r--r-- | include/asm-alpha/system.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index bdb4d66418f1..050e86d12891 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/pal.h> | 5 | #include <asm/pal.h> |
6 | #include <asm/page.h> | 6 | #include <asm/page.h> |
7 | #include <asm/barrier.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * System defines.. Note that this is included both from .c and .S | 10 | * System defines.. Note that this is included both from .c and .S |
@@ -139,36 +140,6 @@ extern void halt(void) __attribute__((noreturn)); | |||
139 | struct task_struct; | 140 | struct task_struct; |
140 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); | 141 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); |
141 | 142 | ||
142 | #define mb() \ | ||
143 | __asm__ __volatile__("mb": : :"memory") | ||
144 | |||
145 | #define rmb() \ | ||
146 | __asm__ __volatile__("mb": : :"memory") | ||
147 | |||
148 | #define wmb() \ | ||
149 | __asm__ __volatile__("wmb": : :"memory") | ||
150 | |||
151 | #define read_barrier_depends() \ | ||
152 | __asm__ __volatile__("mb": : :"memory") | ||
153 | |||
154 | #ifdef CONFIG_SMP | ||
155 | #define smp_mb() mb() | ||
156 | #define smp_rmb() rmb() | ||
157 | #define smp_wmb() wmb() | ||
158 | #define smp_read_barrier_depends() read_barrier_depends() | ||
159 | #else | ||
160 | #define smp_mb() barrier() | ||
161 | #define smp_rmb() barrier() | ||
162 | #define smp_wmb() barrier() | ||
163 | #define smp_read_barrier_depends() barrier() | ||
164 | #endif | ||
165 | |||
166 | #define set_mb(var, value) \ | ||
167 | do { var = value; mb(); } while (0) | ||
168 | |||
169 | #define set_wmb(var, value) \ | ||
170 | do { var = value; wmb(); } while (0) | ||
171 | |||
172 | #define imb() \ | 143 | #define imb() \ |
173 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") | 144 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") |
174 | 145 | ||