File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1424,6 +1424,21 @@ static inline pte_t pte_swp_clear_uffd_wp(pte_t pte)
14241424{
14251425 return pte_clear_flags (pte , _PAGE_SWP_UFFD_WP );
14261426}
1427+
1428+ static inline pmd_t pmd_swp_mkuffd_wp (pmd_t pmd )
1429+ {
1430+ return pmd_set_flags (pmd , _PAGE_SWP_UFFD_WP );
1431+ }
1432+
1433+ static inline int pmd_swp_uffd_wp (pmd_t pmd )
1434+ {
1435+ return pmd_flags (pmd ) & _PAGE_SWP_UFFD_WP ;
1436+ }
1437+
1438+ static inline pmd_t pmd_swp_clear_uffd_wp (pmd_t pmd )
1439+ {
1440+ return pmd_clear_flags (pmd , _PAGE_SWP_UFFD_WP );
1441+ }
14271442#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_WP */
14281443
14291444#define PKRU_AD_BIT 0x1
Original file line number Diff line number Diff line change @@ -46,6 +46,21 @@ static __always_inline pte_t pte_swp_clear_uffd_wp(pte_t pte)
4646{
4747 return pte ;
4848}
49+
50+ static inline pmd_t pmd_swp_mkuffd_wp (pmd_t pmd )
51+ {
52+ return pmd ;
53+ }
54+
55+ static inline int pmd_swp_uffd_wp (pmd_t pmd )
56+ {
57+ return 0 ;
58+ }
59+
60+ static inline pmd_t pmd_swp_clear_uffd_wp (pmd_t pmd )
61+ {
62+ return pmd ;
63+ }
4964#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_WP */
5065
5166#endif /* _ASM_GENERIC_PGTABLE_UFFD_H */
You can’t perform that action at this time.
0 commit comments