Skip to content

Commit

Permalink
powerpc/ptdump: Fix walk_vmemmap() to also print first vmemmap entry
Browse files Browse the repository at this point in the history
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) <[email protected]>
[mpe: Tweak change log wording and add example output]
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://msgid.link/a19ee3dc2b304d39da364a592d5cd167449f8c4a.1713365940.git.ritesh.list@gmail.com
  • Loading branch information
riteshharjani authored and mpe committed Apr 18, 2024
1 parent 0db880f commit f318c8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/mm/ptdump/hashpagetable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f318c8b

Please sign in to comment.