diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-09-25 20:31:26 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-10-19 17:12:45 +1100 |
commit | 42a2722319f0d3d5612ca8efd3ce7d7eae512291 (patch) | |
tree | ef7c4592b8e5966d76713b239af9194f56a4ceb2 /arch/powerpc/include/asm/nohash/64/pgtable.h | |
parent | 0f4027eab59261f2fb72586f18efb44be3594dd4 (diff) |
powerpc/nohash: Refactor pte_update()
pte_update() is similar.
Take the nohash/32 version which works on nohash/64 and add the debug
call to assert_pte_locked() which is only on nohash/64.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/e01cb630cad42f645915ce7702d23985241b71fc.1695659959.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/nohash/64/pgtable.h')
-rw-r--r-- | arch/powerpc/include/asm/nohash/64/pgtable.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h index f5a8e8a9dba4..b149a39f2685 100644 --- a/arch/powerpc/include/asm/nohash/64/pgtable.h +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h @@ -171,23 +171,6 @@ static inline void p4d_set(p4d_t *p4dp, unsigned long val) *p4dp = __p4d(val); } -/* Atomic PTE updates */ -static inline unsigned long pte_update(struct mm_struct *mm, - unsigned long addr, - pte_t *ptep, unsigned long clr, - unsigned long set, - int huge) -{ - unsigned long old = pte_val(*ptep); - *ptep = __pte((old & ~clr) | set); - - /* huge pages use the old page table lock */ - if (!huge) - assert_pte_locked(mm, addr); - - return old; -} - static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; |