/* Nop everywhere except on alpha. */
#define smp_read_barrier_depends()
-/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static inline void rep_nop(void)
{
- asm volatile("rep; nop" ::: "memory");
+ asm volatile("rep; nop" : : : "memory");
}
static inline void cpu_relax(void)
rep_nop();
}
+/*
+ * Serialize core instruction execution. Also acts as a compiler barrier.
+ */
+static inline void sync_core(void)
+{
+ asm volatile("cpuid" : : : "memory", "eax", "ebx", "ecx", "edx");
+}
+
#define rdtscll(val) \
do { \
unsigned int __a, __d; \