.. | .. |
---|
2 | 2 | #ifndef __ASM_BARRIER_H |
---|
3 | 3 | #define __ASM_BARRIER_H |
---|
4 | 4 | |
---|
| 5 | +#include <asm/alternative.h> |
---|
| 6 | + |
---|
5 | 7 | #ifndef __ASSEMBLY__ |
---|
6 | 8 | |
---|
7 | 9 | /* The synchronize caches instruction executes as a nop on systems in |
---|
8 | 10 | which all memory references are performed in order. */ |
---|
9 | | -#define synchronize_caches() __asm__ __volatile__ ("sync" : : : "memory") |
---|
| 11 | +#define synchronize_caches() asm volatile("sync" \ |
---|
| 12 | + ALTERNATIVE(ALT_COND_NO_SMP, INSN_NOP) \ |
---|
| 13 | + : : : "memory") |
---|
10 | 14 | |
---|
11 | 15 | #if defined(CONFIG_SMP) |
---|
12 | 16 | #define mb() do { synchronize_caches(); } while (0) |
---|