mm: remove __HAVE_ARCH_PTE_SWP_EXCLUSIVE

__HAVE_ARCH_PTE_SWP_EXCLUSIVE is now supported by all architectures that
support swp PTEs, so let's drop it.

Link: https://lkml.kernel.org/r/20230113171026.582290-27-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
David Hildenbrand 2023-01-13 18:10:26 +01:00 committed by Andrew Morton
parent f5c3fe300c
commit 950fe885a8
31 changed files with 0 additions and 73 deletions

View file

@ -1064,35 +1064,6 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
#define arch_start_context_switch(prev) do {} while (0)
#endif
/*
* When replacing an anonymous page by a real (!non) swap entry, we clear
* PG_anon_exclusive from the page and instead remember whether the flag was
* set in the swp pte. During fork(), we have to mark the entry as !exclusive
* (possibly shared). On swapin, we use that information to restore
* PG_anon_exclusive, which is very helpful in cases where we might have
* additional (e.g., FOLL_GET) references on a page and wouldn't be able to
* detect exclusivity.
*
* These functions don't apply to non-swap entries (e.g., migration, hwpoison,
* ...).
*/
#ifndef __HAVE_ARCH_PTE_SWP_EXCLUSIVE
static inline pte_t pte_swp_mkexclusive(pte_t pte)
{
return pte;
}
static inline int pte_swp_exclusive(pte_t pte)
{
return false;
}
static inline pte_t pte_swp_clear_exclusive(pte_t pte)
{
return pte;
}
#endif
#ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY
#ifndef CONFIG_ARCH_ENABLE_THP_MIGRATION
static inline pmd_t pmd_swp_mksoft_dirty(pmd_t pmd)