]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Avoid masking "old" for LSE cmpxchg() implementation
authorWill Deacon <will.deacon@arm.com>
Thu, 13 Sep 2018 13:28:33 +0000 (14:28 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 7 Dec 2018 17:28:01 +0000 (17:28 +0000)
commit537b2d72917a7aec34edd011159c9d8566e78381
tree69578d6a718bb6f9ff0f3f4cad3cecb801a88758
parent89f5564a3c6a7b42a249de4887ac28812c9c8dc7
arm64: Avoid masking "old" for LSE cmpxchg() implementation

The CAS instructions implicitly access only the relevant bits of the "old"
argument, so there is no need for explicit masking via type-casting as
there is in the LL/SC implementation.

Move the casting into the LL/SC code and remove it altogether for the LSE
implementation.

Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/atomic_ll_sc.h
arch/arm64/include/asm/atomic_lse.h
arch/arm64/include/asm/cmpxchg.h