mirror-linux/arch/powerpc/include/asm/nohash/32
David Hildenbrand 2bba2ffbe0 powerpc/nohash/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE
Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 32bit and 64bit.

On 64bit, let's use MSB 56 (LSB 7), located right next to the page type. 
On 32bit, let's use LSB 2 to avoid stealing one bit from the swap offset.

There seems to be no real reason why these bits cannot be used for swap
PTEs.  The important part is that _PAGE_PRESENT and _PAGE_HASHPTE remain
0.

While at it, mask the type in __swp_entry() and remove _PAGE_BIT_SWAP_TYPE
from pte-e500.h: while it was used in 64bit code it was ignored in 32bit
code.

Link: https://lkml.kernel.org/r/20230113171026.582290-19-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-02-02 22:33:09 -08:00
..
hugetlb-8xx.h mm: merge pte_mkhuge() call into arch_make_huge_pte() 2022-03-22 15:57:04 -07:00
kup-8xx.h powerpc/kuap: Add kuap_lock() 2021-12-09 22:41:19 +11:00
mmu-8xx.h powerpc/8xx: Activate KUEP at all time 2021-12-09 22:41:17 +11:00
mmu-40x.h powerpc/vdso: Replace vdso_base by vdso 2020-12-04 01:01:16 +11:00
mmu-44x.h powerpc/44x: Activate KUEP at all time 2021-12-09 22:41:17 +11:00
pgalloc.h
pgtable.h powerpc/nohash/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2023-02-02 22:33:09 -08:00
pte-8xx.h powerpc/nohash: Fix __ptep_set_access_flags() and ptep_set_wrprotect() 2021-10-28 00:41:28 +11:00
pte-40x.h powerpc/nohash/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2023-02-02 22:33:09 -08:00
pte-44x.h powerpc/nohash/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2023-02-02 22:33:09 -08:00
pte-85xx.h powerpc/nohash/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2023-02-02 22:33:09 -08:00