aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-15 04:25:57 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-11-02 03:31:53 -0400
commit1071fc5779d9846fec56a4ff6089ab08cac1ab72 (patch)
tree9e20a5fd7a7a2c993e89ef28497dd52f9974daae
parenta8874e7e8a8896f2b6c641f4b8e2473eafd35204 (diff)
mm: introduce mm_[p4d|pud|pmd]_folded
Add three architecture overrideable functions to test if the p4d, pud, or pmd layer of a page table is folded or not. Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--include/asm-generic/pgtable.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 88ebc6102c7c..15fd0277ffa6 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -1127,4 +1127,20 @@ static inline bool arch_has_pfn_modify_check(void)
1127#endif 1127#endif
1128#endif 1128#endif
1129 1129
1130/*
1131 * On some architectures it depends on the mm if the p4d/pud or pmd
1132 * layer of the page table hierarchy is folded or not.
1133 */
1134#ifndef mm_p4d_folded
1135#define mm_p4d_folded(mm) __is_defined(__PAGETABLE_P4D_FOLDED)
1136#endif
1137
1138#ifndef mm_pud_folded
1139#define mm_pud_folded(mm) __is_defined(__PAGETABLE_PUD_FOLDED)
1140#endif
1141
1142#ifndef mm_pmd_folded
1143#define mm_pmd_folded(mm) __is_defined(__PAGETABLE_PMD_FOLDED)
1144#endif
1145
1130#endif /* _ASM_GENERIC_PGTABLE_H */ 1146#endif /* _ASM_GENERIC_PGTABLE_H */