Skip to content

Commit

Permalink
powerpc/mm: Fix hash table dump when memory is not contiguous
Browse files Browse the repository at this point in the history
The current behaviour of the hash table dump assumes that memory is contiguous
and iterates from the start of memory to (start + size of memory). When memory
isn't physically contiguous, this doesn't work.

If memory exists at 0-5 GB and 6-10 GB then the current approach will check if
entries exist in the hash table from 0GB to 9GB. This patch changes the
behaviour to iterate over any holes up to the end of memory.

Fixes: 1515ab9 ("powerpc/mm: Dump hash table")
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Rashmica Gupta authored and Michael Ellerman committed Apr 12, 2017
1 parent aaa2295 commit 9e4114b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/mm/dump_hashpagetable.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static void walk_linearmapping(struct pg_state *st)
unsigned long psize = 1 << mmu_psize_defs[mmu_linear_psize].shift;

for (addr = PAGE_OFFSET; addr < PAGE_OFFSET +
memblock_phys_mem_size(); addr += psize)
memblock_end_of_DRAM(); addr += psize)
hpte_find(st, addr, mmu_linear_psize);
}

Expand Down

0 comments on commit 9e4114b

Please sign in to comment.