diff mbox series

powerpc/ptdump: Fix walk_vmemmap to also print first vmemmap entry

Message ID a19ee3dc2b304d39da364a592d5cd167449f8c4a.1713365940.git.ritesh.list@gmail.com (mailing list archive)
State Accepted
Commit f318c8be797f8572629d5386a88cde7d753457a8
Headers show
Series powerpc/ptdump: Fix walk_vmemmap to also print first vmemmap entry | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.

Commit Message

Ritesh Harjani (IBM) April 17, 2024, 3:07 p.m. UTC
walk_vmemmap() was skipping the first vmemmap entry pointed by
vmemmap_list pointer itself. This patch fixes that.

With this we should see the vmemmap entry at 0xc00c000000000000 for hash
which wasn't getting printed on doing

"cat /sys/kernel/debug/kernel_hash_pagetable"

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
---
 arch/powerpc/mm/ptdump/hashpagetable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.44.0

Comments

Michael Ellerman April 22, 2024, 8:16 a.m. UTC | #1
On Wed, 17 Apr 2024 20:37:40 +0530, Ritesh Harjani (IBM) wrote:
> walk_vmemmap() was skipping the first vmemmap entry pointed by
> vmemmap_list pointer itself. This patch fixes that.
> 
> With this we should see the vmemmap entry at 0xc00c000000000000 for hash
> which wasn't getting printed on doing
> 
> "cat /sys/kernel/debug/kernel_hash_pagetable"
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/ptdump: Fix walk_vmemmap to also print first vmemmap entry
      https://git.kernel.org/powerpc/c/f318c8be797f8572629d5386a88cde7d753457a8

cheers
diff mbox series

Patch

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;
 	}