Memory ordering and usage of ASM cmpxchg() instead of compiler atomic intrinsics

Change-Id: I4dadebc32721744dad982f3fc5b3eea7ab7ca745
This commit is contained in:
Balazs Gerofi
2019-08-13 15:17:07 +09:00
committed by Masamichi Takagi
parent 7aa2d64294
commit c3c57940ba
4 changed files with 30 additions and 26 deletions

View File

@@ -1452,7 +1452,7 @@ retry_alloc:
__FUNCTION__, task_pid_vnr(current), packet->ref);
mb();
if (!packet->req.valid) {
if (!smp_load_acquire(&packet->req.valid)) {
printk("%s: ERROR: stray wakeup pid: %d, tid: %d: SC %lu\n",
__FUNCTION__,
task_tgid_vnr(current),
@@ -1462,7 +1462,7 @@ retry_alloc:
goto retry;
}
packet->req.valid = 0; /* ack */
smp_store_release(&packet->req.valid, 0); /* ack */
dprintk("%s: system call: %d, args[0]: %lu, args[1]: %lu, args[2]: %lu, "
"args[3]: %lu, args[4]: %lu, args[5]: %lu\n",
__FUNCTION__,