powerpc/mm: Dump hash table
PATCH 1/1 powerpc/mm: Dump hash table
Current behaviour assumes that memory in RAM is contiguous and iterates from the start of RAM to (start + size of memory). When the memory isn't physically contiguous, this approach 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 up to the end of RAM.
--- arch/powerpc/mm/dump_hashpagetable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/dump_hashpagetable.c +1 -1
@@ -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); }
Signature · 1 line
2.9.3
Quoted 3 lines · Rashmica Gupta
Current behaviour assumes that memory in RAM is contiguous and iterates from the start of RAM to (start + size of memory). When the memory isn't physically contiguous, this approach doesn't work.
In dis contiguous platform, we just finish up walking linear mapping prematurely before the end of the RAM ?
Quoted 4 lines
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 up to the end of RAM.
So it fixes the commit which added memblock_phys_mem_size(). Hence needs "Fixes: " tag as well.
Quoted 6 lines · Anshuman Khandual
Quoted 3 lines · Rashmica Gupta
Current behaviour assumes that memory in RAM is contiguous and iterates from the start of RAM to (start + size of memory). When the memory isn't physically contiguous, this approach doesn't work.
In dis contiguous platform, we just finish up walking linear mapping prematurely before the end of the RAM ?
Yes, that is what the following example explains.
Quoted 7 lines
Quoted 4 lines
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 up to the end of RAM.
So it fixes the commit which added
memblock_phys_mem_size(). Hence needs "Fixes: " tag as well.
Woops, will add that!
Michael Ellerman
AppliedQuoted 9 lines · Rashmica Gupta
Current behaviour assumes that memory in RAM is contiguous and iterates from the start of RAM to (start + size of memory). When the memory isn't physically contiguous, this approach 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 up to the end of RAM.
Signed-off-by Rashmica Gupta <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/9e4114b3913cff37be509224116b6f
cheers