openrisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE
authorDavid Hildenbrand <david@redhat.com>
Fri, 13 Jan 2023 17:10:15 +0000 (18:10 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:08 +0000 (22:33 -0800)
commit5ae3e74474f82613482ed67b0c234f61ac6ca2dd
tree52957d626663b2e33e9ddda05c2d525cdfe71403
parent4d1d955f7c0cdbb7562d19049f859c74276fdfeb
openrisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE

Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the
type.  Generic MM currently only uses 5 bits for the type
(MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused.

While at it, mask the type in __swp_entry().

Link: https://lkml.kernel.org/r/20230113171026.582290-16-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/openrisc/include/asm/pgtable.h