All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rashmica Gupta <rashmica.g@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: Rashmica Gupta <rashmica.g@gmail.com>
Subject: [PATCH] powerpc/mm: Dump hash table
Date: Mon, 10 Apr 2017 12:04:04 +1000	[thread overview]
Message-ID: <20170410020404.11375-1-rashmica.g@gmail.com> (raw)

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 <rashmica.g@gmail.com>
---
 arch/powerpc/mm/dump_hashpagetable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/dump_hashpagetable.c b/arch/powerpc/mm/dump_hashpagetable.c
index d979709..ee07398 100644
--- a/arch/powerpc/mm/dump_hashpagetable.c
+++ b/arch/powerpc/mm/dump_hashpagetable.c
@@ -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);
 }
 
-- 
2.9.3

             reply	other threads:[~2017-04-10  2:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  2:04 Rashmica Gupta [this message]
2017-04-10  4:02 ` [PATCH] powerpc/mm: Dump hash table Anshuman Khandual
2017-04-10  5:14   ` RashmicaGupta
2017-04-13 11:23 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170410020404.11375-1-rashmica.g@gmail.com \
    --to=rashmica.g@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.