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>
This commit is contained in:

committed by
Michael Ellerman

parent
259a948c4b
commit
d6eacedd1f
@@ -140,6 +140,30 @@ static inline void pte_frag_set(mm_context_t *ctx, void *p)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef pmd_is_leaf
|
||||
#define pmd_is_leaf pmd_is_leaf
|
||||
static inline bool pmd_is_leaf(pmd_t pmd)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef pud_is_leaf
|
||||
#define pud_is_leaf pud_is_leaf
|
||||
static inline bool pud_is_leaf(pud_t pud)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef pgd_is_leaf
|
||||
#define pgd_is_leaf pgd_is_leaf
|
||||
static inline bool pgd_is_leaf(pgd_t pgd)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_POWERPC_PGTABLE_H */
|
||||
|
Reference in New Issue
Block a user