summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>2024-04-17 20:37:40 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2024-04-18 15:35:40 +1000
commitf318c8be797f8572629d5386a88cde7d753457a8 (patch)
tree7d420fcd46e857d4683a4fed60c69ffcda4df89b
parent0db880fc865ffb522141ced4bfa66c12ab1fbb70 (diff)
downloadlinux-f318c8be797f8572629d5386a88cde7d753457a8.tar.gz
linux-f318c8be797f8572629d5386a88cde7d753457a8.tar.bz2
linux-f318c8be797f8572629d5386a88cde7d753457a8.zip
powerpc/ptdump: Fix walk_vmemmap() to also print first vmemmap entry
Currently walk_vmemmap() skips the first vmemmap entry pointed to by vmemmap_list pointer itself. Fix that. With the fix applied the vmemmap entry at 0xc00c000000000000 for hash is displayed: $ cat /sys/kernel/debug/kernel_hash_pagetable ... 0xc00c000000010000: AVPN:cd7bd4e0000 ssize: 1T ... 0xc00c000000000000: AVPN:cd7bd4e0000 ssize: 1T ... Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> [mpe: Tweak change log wording and add example output] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/a19ee3dc2b304d39da364a592d5cd167449f8c4a.1713365940.git.ritesh.list@gmail.com
-rw-r--r--arch/powerpc/mm/ptdump/hashpagetable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c b/arch/powerpc/mm/ptdump/hashpagetable.c
index 9a601587836b..a6baa6166d94 100644
--- a/arch/powerpc/mm/ptdump/hashpagetable.c
+++ b/arch/powerpc/mm/ptdump/hashpagetable.c
@@ -491,7 +491,7 @@ static void walk_vmemmap(struct pg_state *st)
* Traverse the vmemmaped memory and dump pages that are in the hash
* pagetable.
*/
- while (ptr->list) {
+ while (ptr) {
hpte_find(st, ptr->virt_addr, mmu_vmemmap_psize);
ptr = ptr->list;
}