aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/ptdump
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/mm/ptdump
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/mm/ptdump')
-rw-r--r--arch/powerpc/mm/ptdump/ptdump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c
index 646876d9da64..abe60d25b4e6 100644
--- a/arch/powerpc/mm/ptdump/ptdump.c
+++ b/arch/powerpc/mm/ptdump/ptdump.c
@@ -277,7 +277,7 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
277 277
278 for (i = 0; i < PTRS_PER_PMD; i++, pmd++) { 278 for (i = 0; i < PTRS_PER_PMD; i++, pmd++) {
279 addr = start + i * PMD_SIZE; 279 addr = start + i * PMD_SIZE;
280 if (!pmd_none(*pmd) && !pmd_huge(*pmd)) 280 if (!pmd_none(*pmd) && !pmd_is_leaf(*pmd))
281 /* pmd exists */ 281 /* pmd exists */
282 walk_pte(st, pmd, addr); 282 walk_pte(st, pmd, addr);
283 else 283 else
@@ -293,7 +293,7 @@ static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start)
293 293
294 for (i = 0; i < PTRS_PER_PUD; i++, pud++) { 294 for (i = 0; i < PTRS_PER_PUD; i++, pud++) {
295 addr = start + i * PUD_SIZE; 295 addr = start + i * PUD_SIZE;
296 if (!pud_none(*pud) && !pud_huge(*pud)) 296 if (!pud_none(*pud) && !pud_is_leaf(*pud))
297 /* pud exists */ 297 /* pud exists */
298 walk_pmd(st, pud, addr); 298 walk_pmd(st, pud, addr);
299 else 299 else
@@ -314,7 +314,7 @@ static void walk_pagetables(struct pg_state *st)
314 * the hash pagetable. 314 * the hash pagetable.
315 */ 315 */
316 for (i = 0; i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) { 316 for (i = 0; i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) {
317 if (!pgd_none(*pgd) && !pgd_huge(*pgd)) 317 if (!pgd_none(*pgd) && !pgd_is_leaf(*pgd))
318 /* pgd exists */ 318 /* pgd exists */
319 walk_pud(st, pgd, addr); 319 walk_pud(st, pgd, addr);
320 else 320 else