mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
locking/arch: Rename set_mb() to smp_store_mb()
Since set_mb() is really about an smp_mb() -- not a IO/DMA barrier like mb() rename it to match the recent smp_load_acquire() and smp_store_release(). Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
ab3f02fc23
commit
b92b8b35a2
18 changed files with 29 additions and 33 deletions
|
@ -189,7 +189,7 @@ static int __pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
|
|||
* doesn't imply write barrier and the users expect write
|
||||
* barrier semantics on wakeup functions. The following
|
||||
* smp_wmb() is equivalent to smp_wmb() in try_to_wake_up()
|
||||
* and is paired with set_mb() in poll_schedule_timeout.
|
||||
* and is paired with smp_store_mb() in poll_schedule_timeout.
|
||||
*/
|
||||
smp_wmb();
|
||||
pwq->triggered = 1;
|
||||
|
@ -244,7 +244,7 @@ int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
|
|||
/*
|
||||
* Prepare for the next iteration.
|
||||
*
|
||||
* The following set_mb() serves two purposes. First, it's
|
||||
* The following smp_store_mb() serves two purposes. First, it's
|
||||
* the counterpart rmb of the wmb in pollwake() such that data
|
||||
* written before wake up is always visible after wake up.
|
||||
* Second, the full barrier guarantees that triggered clearing
|
||||
|
@ -252,7 +252,7 @@ int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
|
|||
* this problem doesn't exist for the first iteration as
|
||||
* add_wait_queue() has full barrier semantics.
|
||||
*/
|
||||
set_mb(pwq->triggered, 0);
|
||||
smp_store_mb(pwq->triggered, 0);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue