linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: Fix maximum memory value
@ 2019-06-26  9:36 Aravinda Prasad
  2019-06-26 22:36 ` Nathan Lynch
  0 siblings, 1 reply; 3+ messages in thread
From: Aravinda Prasad @ 2019-06-26  9:36 UTC (permalink / raw)
  To: mpe, linuxppc-dev; +Cc: aravinda, naveen.n.rao

Calculating the maximum memory based on the number of lmbs
and lmb size does not account for the RMA region. Hence
use drmem_lmb_memory_max(), which already accounts for the
RMA region, to fetch the maximum memory value.

Fixes: 772b039fd9a7: ("powerpc/pseries: Export maximum memory value")
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/pseries/lparcfg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparcfg.c
index e33e8bc..f425842 100644
--- a/arch/powerpc/platforms/pseries/lparcfg.c
+++ b/arch/powerpc/platforms/pseries/lparcfg.c
@@ -435,7 +435,7 @@ static void maxmem_data(struct seq_file *m)
 {
 	unsigned long maxmem = 0;
 
-	maxmem += drmem_info->n_lmbs * drmem_info->lmb_size;
+	maxmem += drmem_lmb_memory_max();
 	maxmem += hugetlb_total_pages() * PAGE_SIZE;
 
 	seq_printf(m, "MaxMem=%ld\n", maxmem);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-27  8:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26  9:36 [PATCH] powerpc/pseries: Fix maximum memory value Aravinda Prasad
2019-06-26 22:36 ` Nathan Lynch
2019-06-27  8:38   ` Aravinda Prasad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).