aboutsummaryrefslogtreecommitdiff
path: root/include/linux/pgtable.h
diff options
context:
space:
mode:
authorGravatar Jakub Kicinski <kuba@kernel.org> 2022-12-08 16:07:53 -0800
committerGravatar Jakub Kicinski <kuba@kernel.org> 2022-12-08 18:19:59 -0800
commit837e8ac871499d337212e2161c046f5adf1bad33 (patch)
tree2d7bb495b5ce2bce04bf18afd6a57116391efabc /include/linux/pgtable.h
parentMerge branch 'mlx4-better-big-tcp-support' (diff)
parentMerge tag 'net-6.1-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff)
downloadlinux-837e8ac871499d337212e2161c046f5adf1bad33.tar.gz
linux-837e8ac871499d337212e2161c046f5adf1bad33.tar.bz2
linux-837e8ac871499d337212e2161c046f5adf1bad33.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/pgtable.h')
-rw-r--r--include/linux/pgtable.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index a108b60a6962..5f0d7d0b9471 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -165,6 +165,13 @@ static inline pte_t *virt_to_kpte(unsigned long vaddr)
return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr);
}
+#ifndef pmd_young
+static inline int pmd_young(pmd_t pmd)
+{
+ return 0;
+}
+#endif
+
#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
extern int ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long address, pte_t *ptep,
@@ -260,6 +267,17 @@ static inline int pmdp_clear_flush_young(struct vm_area_struct *vma,
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif
+#ifndef arch_has_hw_nonleaf_pmd_young
+/*
+ * Return whether the accessed bit in non-leaf PMD entries is supported on the
+ * local CPU.
+ */
+static inline bool arch_has_hw_nonleaf_pmd_young(void)
+{
+ return IS_ENABLED(CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG);
+}
+#endif
+
#ifndef arch_has_hw_pte_young
/*
* Return whether the accessed bit is supported on the local CPU.