sparc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 64bit
authorDavid Hildenbrand <david@redhat.com>
Fri, 13 Jan 2023 17:10:22 +0000 (18:10 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:10 +0000 (22:33 -0800)
commitadf8e329ff56a873c789f797a69a330fb8c4ff9e
tree6af5c3e849287870a79330cbf8b350af949ddd4e
parente6b37d7f6f17db638275b6f8fd78714c047e3a57
sparc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 64bit

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 was effectively unused.

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

Link: https://lkml.kernel.org/r/20230113171026.582290-23-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/sparc/include/asm/pgtable_64.h