makedumpfile/makedumpfile-ppc64-VA-range-SUSE.patch
Petr Tesařík fc54b30a87 Accepting request 971036 from home:polslinux:branches:Kernel:kdump
- Update to 1.7.1:
  * support for kernel up to 5.17
  * sadump: remove variable length array
  * print error when reading with unsupported compression
- Drop upstreamed makedumpfile-sadump-kaslr-fix-kaslr_offset-calculation.patch

OBS-URL: https://build.opensuse.org/request/show/971036
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=164
2022-06-07 09:47:24 +00:00

66 lines
2.2 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(-)
Index: makedumpfile-1.7.1/arch/ppc64.c
===================================================================
--- makedumpfile-1.7.1.orig/arch/ppc64.c
+++ makedumpfile-1.7.1/arch/ppc64.c
@@ -248,7 +248,9 @@ ppc64_vmalloc_init(void)
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;
Index: makedumpfile-1.7.1/makedumpfile.c
===================================================================
--- makedumpfile-1.7.1.orig/makedumpfile.c
+++ makedumpfile-1.7.1/makedumpfile.c
@@ -2491,6 +2491,8 @@ write_vmcoreinfo_data(void)
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);
@@ -2939,6 +2941,8 @@ read_vmcoreinfo(void)
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
+ READ_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
+
return TRUE;
}
Index: makedumpfile-1.7.1/makedumpfile.h
===================================================================
--- makedumpfile-1.7.1.orig/makedumpfile.h
+++ makedumpfile-1.7.1/makedumpfile.h
@@ -2069,6 +2069,9 @@ struct number_table {
unsigned long PHYS_OFFSET;
unsigned long kimage_voffset;
#endif
+
+ /* Distro-specific */
+ long SUSE_PRODUCT_CODE;
};
struct srcfile_table {