summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2022-11-30 14:49:41 -0800
committerAndrew Morton <akpm@linux-foundation.org>2022-11-30 14:49:41 -0800
commit6617da8fb565445e0be4a4885443006374943d09 (patch)
tree8ae5dabc8b1fd904e4aa442144ecb55bb0a4cfa0 /include
parent95bc35f9bee5220dad4e8567654ab3288a181639 (diff)
downloadlinux-starfive-6617da8fb565445e0be4a4885443006374943d09.tar.gz
linux-starfive-6617da8fb565445e0be4a4885443006374943d09.tar.bz2
linux-starfive-6617da8fb565445e0be4a4885443006374943d09.zip
mm: add dummy pmd_young() for architectures not having it
In order to avoid #ifdeffery add a dummy pmd_young() implementation as a fallback. This is required for the later patch "mm: introduce arch_has_hw_nonleaf_pmd_young()". Link: https://lkml.kernel.org/r/fd3ac3cd-7349-6bbd-890a-71a9454ca0b3@suse.com Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Yu Zhao <yuzhao@google.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Sander Eikelenboom <linux@eikelenboom.it> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pgtable.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index a108b60a6962..6b0d59269b33 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,