[Crash-utility] [PATCH] ppc64: increase MAX_PHYSMEM_BITS to 128TB

Hari Bathini hbathini at linux.ibm.com
Wed Sep 26 20:36:49 UTC 2018


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 at linux.ibm.com>
---
 defs.h  |    1 +
 ppc64.c |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/defs.h b/defs.h
index 80c61ef..5b64bb7 100644
--- a/defs.h
+++ b/defs.h
@@ -4073,6 +4073,7 @@ struct efi_memory_desc_t {
 #define _SECTION_SIZE_BITS	24
 #define _MAX_PHYSMEM_BITS	44
 #define _MAX_PHYSMEM_BITS_3_7   46
+#define _MAX_PHYSMEM_BITS_4_19  47
 
 #endif /* PPC64 */
 
diff --git a/ppc64.c b/ppc64.c
index 8badcde..ee2f76f 100644
--- a/ppc64.c
+++ b/ppc64.c
@@ -554,7 +554,10 @@ ppc64_init(int when)
 			ppc64_vmemmap_init();
 
 		machdep->section_size_bits = _SECTION_SIZE_BITS;
-		if (THIS_KERNEL_VERSION >= LINUX(3,7,0))
+		if ((machdep->flags & VMEMMAP) &&
+		    (THIS_KERNEL_VERSION >= LINUX(4,19,0)))
+			machdep->max_physmem_bits = _MAX_PHYSMEM_BITS_4_19;
+		else if (THIS_KERNEL_VERSION >= LINUX(3,7,0))
 			machdep->max_physmem_bits = _MAX_PHYSMEM_BITS_3_7;
 		else
 			machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;




More information about the Crash-utility mailing list