diff options
author | David Hildenbrand <david@redhat.com> | 2023-01-13 18:10:20 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-03 07:33:10 +0100 |
commit | cca10df1029373cda5904887544ca6fcbbd2bac7 (patch) | |
tree | 33a026658bb008029cac418c91d7325207937fe2 /Kbuild | |
parent | riscv/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE (diff) | |
download | linux-cca10df1029373cda5904887544ca6fcbbd2bac7.tar.xz linux-cca10df1029373cda5904887544ca6fcbbd2bac7.zip |
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 'Kbuild')
0 files changed, 0 insertions, 0 deletions