Files
makedumpfile/makedumpfile-ppc64-VA-range-SUSE.patch
Petr Tesařík 7af1061df7 Accepting request 1126600 from home:ptesarik:branches:Kernel:kdump
- Reduce compatibility cruft.
- Update to 1.7.4:
  * Add riscv64 support
  * Support kernels up to v6.6 (x86_64)
- Drop upstreamed patches:
  * ppc64-do-page-traversal-if-vmemmap_list-not-po.patch
  * Support-struct-module_memory-on-Linux-6.4-and-.patch
- Build with a bundled eppic git snapshot.

OBS-URL: https://build.opensuse.org/request/show/1126600
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=173
2023-11-15 13:55:18 +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 kernel_link_addr;
unsigned long va_kernel_pa_offset;
#endif
+
+ /* Distro-specific */
+ long SUSE_PRODUCT_CODE;
};
struct srcfile_table {