2019-02-14 17:57:03 +00:00
|
|
|
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.
|
2024-05-16 07:26:33 +00:00
|
|
|
diff -uprN makedumpfile-1.7.5.orig/arch/ppc64.c makedumpfile-1.7.5/arch/ppc64.c
|
|
|
|
--- makedumpfile-1.7.5.orig/arch/ppc64.c 2024-04-12 13:09:09.000000000 +0800
|
|
|
|
+++ makedumpfile-1.7.5/arch/ppc64.c 2024-05-16 14:19:46.846209221 +0800
|
|
|
|
@@ -261,7 +261,9 @@ ppc64_vmalloc_init(void)
|
2019-02-14 17:57:03 +00:00
|
|
|
|
2019-08-14 14:18:37 +00:00
|
|
|
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;
|
2024-05-16 07:26:33 +00:00
|
|
|
diff -uprN makedumpfile-1.7.5.orig/makedumpfile.c makedumpfile-1.7.5/makedumpfile.c
|
|
|
|
--- makedumpfile-1.7.5.orig/makedumpfile.c 2024-04-12 13:09:09.000000000 +0800
|
|
|
|
+++ makedumpfile-1.7.5/makedumpfile.c 2024-05-16 14:16:42.897988141 +0800
|
|
|
|
@@ -2531,6 +2531,7 @@ write_vmcoreinfo_data(void)
|
|
|
|
WRITE_NUMBER_UNSIGNED("PHYS_OFFSET", PHYS_OFFSET);
|
2019-02-14 17:57:03 +00:00
|
|
|
WRITE_NUMBER_UNSIGNED("kimage_voffset", kimage_voffset);
|
|
|
|
#endif
|
2024-05-16 07:26:33 +00:00
|
|
|
+ WRITE_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
|
2019-02-14 17:57:03 +00:00
|
|
|
|
|
|
|
if (info->phys_base)
|
|
|
|
fprintf(info->file_vmcoreinfo, "%s%lu\n", STR_NUMBER("phys_base"),
|
2024-05-16 07:26:33 +00:00
|
|
|
@@ -3002,6 +3003,7 @@ read_vmcoreinfo(void)
|
2019-02-14 17:57:03 +00:00
|
|
|
|
|
|
|
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
2024-05-16 07:26:33 +00:00
|
|
|
READ_NUMBER("RADIX_MMU", RADIX_MMU);
|
2019-02-14 17:57:03 +00:00
|
|
|
+ READ_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
|
2024-05-16 07:26:33 +00:00
|
|
|
|
2019-02-14 17:57:03 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2024-05-16 07:26:33 +00:00
|
|
|
diff -uprN makedumpfile-1.7.5.orig/makedumpfile.h makedumpfile-1.7.5/makedumpfile.h
|
|
|
|
--- makedumpfile-1.7.5.orig/makedumpfile.h 2024-04-12 13:09:09.000000000 +0800
|
|
|
|
+++ makedumpfile-1.7.5/makedumpfile.h 2024-05-16 14:18:08.275376258 +0800
|
|
|
|
@@ -2283,6 +2283,9 @@ struct number_table {
|
2023-11-15 13:55:18 +00:00
|
|
|
unsigned long va_kernel_pa_offset;
|
2019-08-14 14:18:37 +00:00
|
|
|
#endif
|
2024-05-16 07:26:33 +00:00
|
|
|
|
2019-08-14 14:18:37 +00:00
|
|
|
+ /* Distro-specific */
|
|
|
|
+ long SUSE_PRODUCT_CODE;
|
2024-05-16 07:26:33 +00:00
|
|
|
+
|
|
|
|
unsigned long RADIX_MMU;
|
2019-08-14 14:18:37 +00:00
|
|
|
};
|
2019-02-14 17:57:03 +00:00
|
|
|
|