]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cmpwait: Clear event register before arming exclusive monitor
authorWill Deacon <will.deacon@arm.com>
Mon, 30 Apr 2018 12:56:32 +0000 (13:56 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 16 May 2018 11:21:19 +0000 (12:21 +0100)
commitd6bcbc593a48ace3d5204d84d666df756f18b065
tree26b8bdfb1f4ed97238a496c47f047936ddb5d866
parent7dbf4e2f9e061c0cef9ed06619e43843fb0cf3a4
arm64: cmpwait: Clear event register before arming exclusive monitor

When waiting for a cacheline to change state in cmpwait, we may immediately
wake-up the first time around the outer loop if the event register was
already set (for example, because of the event stream).

Avoid these spurious wakeups by explicitly clearing the event register
before loading the cacheline and setting the exclusive monitor.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cmpxchg.h