makedumpfile/makedumpfile-ppc64-update-hash-page-table-geometry.patch
Lance Wang cab31fc363 Accepting request 542108 from home:michals
- ppc64 Can't convert a virtual address (bsc#1067703)
  * Added patches: ppc64-update-hash-page-table-geometry.patch
                   book3s-ppc64-Lower-the-max-real-address-to-53-bits.patch
  * Refresh makedumpfile-Fix-SECTION_MAP_MASK-for-kernel-v.13.patch to also
    apply to SLE15 (4.12 kernel) due to backport of 2d070eab2e82 (bsc#1067703)

OBS-URL: https://build.opensuse.org/request/show/542108
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=110
2017-11-22 09:46:23 +00:00

61 lines
2.2 KiB
Diff

From 13f48cbab7207d8247834453b55d45b2a95f65cb Mon Sep 17 00:00:00 2001
From: Hari Bathini <hbathini@linux.vnet.ibm.com>
Date: Sat, 11 Nov 2017 02:13:54 +0900
Subject: [PATCH] [PATCH] ppc64: update hash page table geometry
Patch-mainline: yes
References: bsc#1067703
* Required for kernel 4.12
Starting with kernel 4.12, BOOK3S hash page table geometry is updated
to accommodate larger virtual address range. Update here accordingly.
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
arch/ppc64.c | 12 +++++++++---
makedumpfile.h | 3 +++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/ppc64.c b/arch/ppc64.c
index 2f5a0daa16b2..8bdbcc583c47 100644
--- a/arch/ppc64.c
+++ b/arch/ppc64.c
@@ -245,10 +245,16 @@ ppc64_vmalloc_init(void)
} else if (info->kernel_version >= KERNEL_VERSION(4, 6, 0)) {
info->l1_index_size = PTE_INDEX_SIZE_L4_64K_3_10;
- info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_6;
- info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_6;
- info->l4_index_size = PGD_INDEX_SIZE_L4_64K_3_10;
+ if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
+ info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
+ info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
+ info->l4_index_size = PGD_INDEX_SIZE_L4_64K_4_12;
+ } else {
+ info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_6;
+ info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_6;
+ info->l4_index_size = PGD_INDEX_SIZE_L4_64K_3_10;
+ }
} else if (info->kernel_version >= KERNEL_VERSION(3, 10, 0)) {
info->l1_index_size = PTE_INDEX_SIZE_L4_64K_3_10;
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_3_10;
diff --git a/makedumpfile.h b/makedumpfile.h
index db753792bca6..b983aaf5ab03 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -670,6 +670,9 @@ unsigned long get_kvbase_arm64(void);
#define PGD_INDEX_SIZE_L4_64K_3_10 12
#define PMD_INDEX_SIZE_L4_64K_4_6 5
#define PUD_INDEX_SIZE_L4_64K_4_6 5
+#define PMD_INDEX_SIZE_L4_64K_4_12 10
+#define PUD_INDEX_SIZE_L4_64K_4_12 7
+#define PGD_INDEX_SIZE_L4_64K_4_12 8
#define PTE_INDEX_SIZE_RADIX_64K 5
#define PMD_INDEX_SIZE_RADIX_64K 9
#define PUD_INDEX_SIZE_RADIX_64K 9
--
2.13.6