Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

riscv: mm: use xchg() on non-atomic_long_t variables, not atomic_long_xchg()

Let's not call atomic_long_xchg() on something that's not an
atomic_long_t, and just use xchg() instead. Continues the cleanup
from commit 546e42c8c6d94 ("riscv: Use an atomic xchg in
pudp_huge_get_and_clear()"),

Cc: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Paul Walmsley <pjw@kernel.org>

+2 -2
+2 -2
arch/riscv/include/asm/pgtable.h
··· 661 661 unsigned long address, pte_t *ptep) 662 662 { 663 663 #ifdef CONFIG_SMP 664 - pte_t pte = __pte(atomic_long_xchg((atomic_long_t *)ptep, 0)); 664 + pte_t pte = __pte(xchg(&ptep->pte, 0)); 665 665 #else 666 666 pte_t pte = *ptep; 667 667 ··· 1004 1004 unsigned long address, pmd_t *pmdp) 1005 1005 { 1006 1006 #ifdef CONFIG_SMP 1007 - pmd_t pmd = __pmd(atomic_long_xchg((atomic_long_t *)pmdp, 0)); 1007 + pmd_t pmd = __pmd(xchg(&pmdp->pmd, 0)); 1008 1008 #else 1009 1009 pmd_t pmd = *pmdp; 1010 1010