* Required for kernel 4.20

With kernel commit 4ffe713b7587 ("powerpc/mm: Increase the max addressable
memory to 2PB"), MAX_PHYSMEM_BITS is bumped up to 51 for SPARSEMEM_VMEMMAP
and SPARSEMEM_EXTREME case. Make the appropriate update here.

Signed-off-by: Hari Bathini <[email protected]>
---
 arch/ppc64.c   |    5 +++++
 makedumpfile.h |    1 +
 2 files changed, 6 insertions(+)

diff --git a/arch/ppc64.c b/arch/ppc64.c
index 947a125..5b8231e 100644
--- a/arch/ppc64.c
+++ b/arch/ppc64.c
@@ -486,6 +486,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_20;
+       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.h b/makedumpfile.h
index 73813ed..d49f1f1 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -672,6 +672,7 @@ unsigned long get_kvbase_arm64(void);
 #define _MAX_PHYSMEM_BITS_ORIG  (44)
 #define _MAX_PHYSMEM_BITS_3_7   (46)
 #define _MAX_PHYSMEM_BITS_4_19  (47)
+#define _MAX_PHYSMEM_BITS_4_20  (51)
 #define REGION_SHIFT            (60UL)
 #define VMEMMAP_REGION_ID       (0xfUL)
 


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to