Commit f4ec9516 authored by Anton Blanchard's avatar Anton Blanchard

Use HMT hints in cpu_relax

parent b77e5d86
......@@ -708,7 +708,7 @@ static inline unsigned int __pack_fe01(unsigned int fpmode)
return ((fpmode << 10) & MSR_FE0) | ((fpmode << 8) & MSR_FE1);
}
#define cpu_relax() barrier()
#define cpu_relax() do { HMT_low(); HMT_medium(); barrier(); } while (0)
/*
* Prefetch macros.
......
......@@ -210,7 +210,7 @@ static __inline__ int is_write_locked(rwlock_t *rw)
}
#define spin_lock_init(x) do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
#define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x))
#define spin_unlock_wait(x) do { cpu_relax(); } while(spin_is_locked(x))
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment