File crash-SLE15-SP1-With-Linux-4.19-rc1-up-MAX_PHYSMEM_BITS-to-128TB.patch of Package crash.16727
From 599a6579aa916df7800f8e889d68e4287e4520dd Mon Sep 17 00:00:00 2001
From: Dave Anderson <anderson@redhat.com>
Date: Thu, 27 Sep 2018 14:14:31 -0400
Subject: [PATCH] With Linux 4.19-rc1 commit
7d4340bb92a9df78e6e28152f3dd89d9bd82146b, titled "powerpc/mm: Increase
MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config", the PPC64
MAX_PHYSMEM_BITS value has been bumped up to 47. The appropriate update has
been made in this patch. (hbathini@linux.ibm.com)
[note: apply on 4.12+ for SLE 15 SP1 - incompatible with SLE 15 SP0]
---
defs.h | 1 +
ppc64.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/defs.h b/defs.h
index 80c61ef94f3d..5b64bb7bb629 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 8badcde3ca76..ee2f76f198fb 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,12,0))) /* SLE15 SP1 */
+ 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;
--
2.19.2