makedumpfile/makedumpfile-ppc64-VA-range-SUSE.patch
Michal Suchanek 375fa0cbbc Accepting request 713581 from home:michals
- Also support extended address space with SLE 12 SP5 (bsc#1138451)
  * refresh makedumpfile-ppc64-VA-range-SUSE.patch

OBS-URL: https://build.opensuse.org/request/show/713581
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=132
2019-08-14 14:18:37 +00:00

63 lines
2.0 KiB
Diff

From: Petr Tesarik <ptesarik@suse.cz>
Subject: Use correct l3 index size with SLE15-SP1 ppc64le kernels
References: bsc#1123015
Upstream: never, SUSE-specific
SLE 15 SP1 backported commit c2b4d8b7417a ("powerpc/mm/hash64: Increase
the VA range"), to Linux 4.12, so let's check SUSE_PRODUCT_CODE.
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
arch/ppc64.c | 3 ++-
makedumpfile.c | 4 ++++
makedumpfile.h | 3 +++
3 files changed, 9 insertions(+), 1 deletion(-)
diff -ur a/arch/ppc64.c b/arch/ppc64.c
--- a/arch/ppc64.c 2018-12-04 21:21:52.000000000 +0100
+++ b/arch/ppc64.c 2019-07-05 11:25:20.318510887 +0200
@@ -248,7 +248,9 @@
if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
- if (info->kernel_version >= KERNEL_VERSION(4, 17, 0))
+ if (info->kernel_version >= KERNEL_VERSION(4, 17, 0) ||
+ ((NUMBER(SUSE_PRODUCT_CODE) & ~0xffL) == 0x010f0100) ||
+ ((NUMBER(SUSE_PRODUCT_CODE) & ~0xffL) == 0x010c0500))
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
else
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
diff -ur a/makedumpfile.c b/makedumpfile.c
--- a/makedumpfile.c 2018-12-04 21:21:52.000000000 +0100
+++ b/makedumpfile.c 2019-07-05 11:23:32.357093984 +0200
@@ -2296,6 +2296,8 @@
WRITE_NUMBER_UNSIGNED("kimage_voffset", kimage_voffset);
#endif
+ WRITE_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
+
if (info->phys_base)
fprintf(info->file_vmcoreinfo, "%s%lu\n", STR_NUMBER("phys_base"),
info->phys_base);
@@ -2696,6 +2698,8 @@
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
+ READ_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
+
return TRUE;
}
diff -ur a/makedumpfile.h b/makedumpfile.h
--- a/makedumpfile.h 2018-12-04 21:21:52.000000000 +0100
+++ b/makedumpfile.h 2019-07-05 11:23:32.353093931 +0200
@@ -1936,6 +1936,9 @@
unsigned long PHYS_OFFSET;
unsigned long kimage_voffset;
#endif
+
+ /* Distro-specific */
+ long SUSE_PRODUCT_CODE;
};
struct srcfile_table {