aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/openrisc/include
diff options
context:
space:
mode:
authorMagnus Lindholm <linmag7@gmail.com>2025-02-18 18:55:14 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2025-06-11 14:52:08 -0700
commit403d1338a4a59cfebb4ded53fa35fbd5119f36b1 (patch)
tree117ff0334dae19186f2fc7c131fd78b864965bcf /arch/openrisc/include
parentKEYS: Invert FINAL_PUT bit (diff)
downloadwireguard-linux-403d1338a4a59cfebb4ded53fa35fbd5119f36b1.tar.xz
wireguard-linux-403d1338a4a59cfebb4ded53fa35fbd5119f36b1.zip
mm: pgtable: fix pte_swp_exclusive
Make pte_swp_exclusive return bool instead of int. This will better reflect how pte_swp_exclusive is actually used in the code. This fixes swap/swapoff problems on Alpha due pte_swp_exclusive not returning correct values when _PAGE_SWP_EXCLUSIVE bit resides in upper 32-bits of PTE (like on alpha). Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Magnus Lindholm <linmag7@gmail.com> Cc: Sam James <sam@gentoo.org> Link: https://lore.kernel.org/lkml/20250218175735.19882-2-linmag7@gmail.com/ Link: https://lore.kernel.org/lkml/20250602041118.GA2675383@ZenIV/ [ Applied as the 'sed' script Al suggested - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r--arch/openrisc/include/asm/pgtable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/openrisc/include/asm/pgtable.h b/arch/openrisc/include/asm/pgtable.h
index 71bfb8c8c482..5bd6463bd514 100644
--- a/arch/openrisc/include/asm/pgtable.h
+++ b/arch/openrisc/include/asm/pgtable.h
@@ -411,7 +411,7 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf,
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
-static inline int pte_swp_exclusive(pte_t pte)
+static inline bool pte_swp_exclusive(pte_t pte)
{
return pte_val(pte) & _PAGE_SWP_EXCLUSIVE;
}