[PATCH] ppc64: increase MAX_PHYSMEM_BITS to 128TB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 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;

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux