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

Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by reusing the SRMMU_DIRTY bit
as that seems to be safe to reuse inside a swap PTE.  This avoids having
to steal one bit from the swap offset.

While at it, relocate the swap PTE layout documentation and use the same
style now used for most other archs.  Note that the old documentation was
wrong: we use 20 bit for the offset and the reserved bits were 8 instead
of 7 bits in the ascii art.

Link: https://lkml.kernel.org/r/20230113171026.582290-22-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_32.h
arch/sparc/include/asm/pgtsrmmu.h