x86/mm/pae: Be consistent with pXXp_get_and_clear()
authorPeter Zijlstra <peterz@infradead.org>
Mon, 30 Nov 2020 11:21:25 +0000 (12:21 +0100)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 15 Dec 2022 18:37:27 +0000 (10:37 -0800)
commitb7301f20105a27112f7ca8040cfb0b0505a32fbd
treead3f79ecb92e1d93caaef1cb81c238951ca06e30
parentf7bcd4617de67a4700a7bd7dc56808b57f1c8748
x86/mm/pae: Be consistent with pXXp_get_and_clear()

Given that ptep_get_and_clear() uses cmpxchg8b, and that should be by
far the most common case, there's no point in having an optimized
variant for pmd/pud.

Introduce the pxx_xchg64() helper to implement the common logic once.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221022114425.103392961%40infradead.org
arch/x86/include/asm/pgtable-3level.h