From 1ce09879ba20fe6f0119fb8b38528cd3b5125a1b Mon Sep 17 00:00:00 2001
From: Hari Bathini <hbathini@linux.ibm.com>
Date: Wed, 26 Sep 2018 22:26:26 +0530
Subject: [PATCH] [PATCH] ppc64: increase MAX_PHYSMEM_BITS to 128TB
* Required for kernel 4.19
With kernel commit 7d4340bb92a9 ("powerpc/mm: Increase MAX_PHYSMEM_BITS
to 128TB with SPARSEMEM_VMEMMAP config"), MAX_PHYSMEM_BITS is bumped up
to 47. Make the appropriate update here.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Pingfan Liu <piliu@redhat.com>
---
arch/ppc64.c | 5 +++++
makedumpfile.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/makedumpfile-1.6.4/arch/ppc64.c b/makedumpfile-1.6.4/arch/ppc64.c
index 8b6f7d5..947a125 100644
--- a/makedumpfile-1.6.4/arch/ppc64.c
+++ b/makedumpfile-1.6.4/arch/ppc64.c
@@ -481,6 +481,11 @@ set_ppc64_max_physmem_bits(void)
|| (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT())))
return TRUE;
+ info->max_physmem_bits = _MAX_PHYSMEM_BITS_4_19;
+ if ((array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT_EXTREME()))
+ || (array_len == (NR_MEM_SECTIONS() / _SECTIONS_PER_ROOT())))
+ return TRUE;
+
return FALSE;
}
diff --git a/makedumpfile-1.6.4/makedumpfile.h b/makedumpfile-1.6.4/makedumpfile.h
index d1fcd87..46ebe2e 100644
--- a/makedumpfile-1.6.4/makedumpfile.h
+++ b/makedumpfile-1.6.4/makedumpfile.h
@@ -673,6 +673,7 @@ unsigned long get_kvbase_arm64(void);
#define _SECTION_SIZE_BITS (24)
#define _MAX_PHYSMEM_BITS_ORIG (44)
#define _MAX_PHYSMEM_BITS_3_7 (46)
+#define _MAX_PHYSMEM_BITS_4_19 (47)
#define REGION_SHIFT (60UL)
#define VMEMMAP_REGION_ID (0xfUL)
--
2.7.4