aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pgtable.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>2019-05-14 02:03:00 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2019-07-04 10:43:50 -0400
commitd6eacedd1f0ebf00bdf1c77715d194f7c1036fd4 (patch)
treebf977356cbeb533eb3a4e2d73d4923eba6188be3 /arch/powerpc/include/asm/pgtable.h
parent259a948c4ba1829ae4a3c31bb6e40ad458a21254 (diff)
powerpc/book3s: Use config independent helpers for page table walk
Even when we have HugeTLB and THP disabled, kernel linear map can still be mapped with hugepages. This is only an issue with radix translation because hash MMU doesn't map kernel linear range in linux page table and other kernel map areas are not mapped using hugepage. Add config independent helpers and put WARN_ON() when we don't expect things to be mapped via hugepages. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/pgtable.h')
-rw-r--r--arch/powerpc/include/asm/pgtable.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 3f53be60fb01..bf7d771f342e 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -140,6 +140,30 @@ static inline void pte_frag_set(mm_context_t *ctx, void *p)
140} 140}
141#endif 141#endif
142 142
143#ifndef pmd_is_leaf
144#define pmd_is_leaf pmd_is_leaf
145static inline bool pmd_is_leaf(pmd_t pmd)
146{
147 return false;
148}
149#endif
150
151#ifndef pud_is_leaf
152#define pud_is_leaf pud_is_leaf
153static inline bool pud_is_leaf(pud_t pud)
154{
155 return false;
156}
157#endif
158
159#ifndef pgd_is_leaf
160#define pgd_is_leaf pgd_is_leaf
161static inline bool pgd_is_leaf(pgd_t pgd)
162{
163 return false;
164}
165#endif
166
143#endif /* __ASSEMBLY__ */ 167#endif /* __ASSEMBLY__ */
144 168
145#endif /* _ASM_POWERPC_PGTABLE_H */ 169#endif /* _ASM_POWERPC_PGTABLE_H */