summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2023-01-13 20:10:20 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-02-03 09:33:10 +0300
commitcca10df1029373cda5904887544ca6fcbbd2bac7 (patch)
tree33a026658bb008029cac418c91d7325207937fe2 /arch/sparc
parent51a1007d4113c632ec5229c685e2162b72d9746d (diff)
downloadlinux-cca10df1029373cda5904887544ca6fcbbd2bac7.tar.xz
sh/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE
Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using bit 6 in the PTE, reducing the swap type in the !CONFIG_X2TLB case to 5 bits. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. Interrestingly, the swap type in the !CONFIG_X2TLB case could currently overlap with the _PAGE_PRESENT bit, because there is a sneaky shift by 1 in __pte_to_swp_entry() and __swp_entry_to_pte(). Bit 0-7 in the architecture specific swap PTE would get shifted to bit 1-8 in the PTE. As generic MM uses 5 bits only, this didn't matter so far. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-21-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/sparc')
0 files changed, 0 insertions, 0 deletions