mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
locking/barriers: Replace smp_cond_acquire() with smp_cond_load_acquire()
This new form allows using hardware assisted waiting. Some hardware (ARM64 and x86) allow monitoring an address for changes, so by providing a pointer we can use this to replace the cpu_relax() with hardware optimized methods in the future. Requested-by: Will Deacon <will.deacon@arm.com> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
245050c287
commit
1f03e8d291
5 changed files with 31 additions and 18 deletions
|
@ -107,7 +107,7 @@ void __init call_function_init(void)
|
|||
*/
|
||||
static __always_inline void csd_lock_wait(struct call_single_data *csd)
|
||||
{
|
||||
smp_cond_acquire(!(csd->flags & CSD_FLAG_LOCK));
|
||||
smp_cond_load_acquire(&csd->flags, !(VAL & CSD_FLAG_LOCK));
|
||||
}
|
||||
|
||||
static __always_inline void csd_lock(struct call_single_data *csd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue