mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
Adding these missing helpers for uffd-wp operations with pmd swap/migration entries. Signed-off-by: Peter Xu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Mike Rapoport <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Bobby Powers <[email protected]> Cc: Brian Geffon <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Denis Plotnikov <[email protected]> Cc: "Dr . David Alan Gilbert" <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: "Kirill A . Shutemov" <[email protected]> Cc: Martin Cracauer <[email protected]> Cc: Marty McFadden <[email protected]> Cc: Maya Gokhale <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Shaohua Li <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
67 lines
1.0 KiB
C
67 lines
1.0 KiB
C
#ifndef _ASM_GENERIC_PGTABLE_UFFD_H
|
|
#define _ASM_GENERIC_PGTABLE_UFFD_H
|
|
|
|
#ifndef CONFIG_HAVE_ARCH_USERFAULTFD_WP
|
|
static __always_inline int pte_uffd_wp(pte_t pte)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static __always_inline int pmd_uffd_wp(pmd_t pmd)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static __always_inline pte_t pte_mkuffd_wp(pte_t pte)
|
|
{
|
|
return pte;
|
|
}
|
|
|
|
static __always_inline pmd_t pmd_mkuffd_wp(pmd_t pmd)
|
|
{
|
|
return pmd;
|
|
}
|
|
|
|
static __always_inline pte_t pte_clear_uffd_wp(pte_t pte)
|
|
{
|
|
return pte;
|
|
}
|
|
|
|
static __always_inline pmd_t pmd_clear_uffd_wp(pmd_t pmd)
|
|
{
|
|
return pmd;
|
|
}
|
|
|
|
static __always_inline pte_t pte_swp_mkuffd_wp(pte_t pte)
|
|
{
|
|
return pte;
|
|
}
|
|
|
|
static __always_inline int pte_swp_uffd_wp(pte_t pte)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static __always_inline pte_t pte_swp_clear_uffd_wp(pte_t pte)
|
|
{
|
|
return pte;
|
|
}
|
|
|
|
static inline pmd_t pmd_swp_mkuffd_wp(pmd_t pmd)
|
|
{
|
|
return pmd;
|
|
}
|
|
|
|
static inline int pmd_swp_uffd_wp(pmd_t pmd)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline pmd_t pmd_swp_clear_uffd_wp(pmd_t pmd)
|
|
{
|
|
return pmd;
|
|
}
|
|
#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_WP */
|
|
|
|
#endif /* _ASM_GENERIC_PGTABLE_UFFD_H */
|