MIPS: Remove open-coded cmpxchg() in set_pte()
authorPaul Burton <paul.burton@mips.com>
Sat, 2 Feb 2019 02:01:02 +0000 (02:01 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 4 Feb 2019 18:56:48 +0000 (10:56 -0800)
commit82f4f66ddf11fd4bd2e9b589fd69d0ec6ea777fc
tree661321dc0409e02b9c9b1429f6488b5683eb44e6
parentc8790d657b0a8d42801fb4536f6f106b4b6306e8
MIPS: Remove open-coded cmpxchg() in set_pte()

set_pte() contains an open coded version of cmpxchg() - it atomically
replaces the buddy pte's value if it is currently zero. Simplify the
code considerably by just using cmpxchg() instead of reinventing it.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
arch/mips/include/asm/pgtable.h