Blame SOURCES/kexec-tools-2.0.15-makedumpfile-arm64-Fix-calculation-of-page_offset-in-case-we-are-.patch

cf4a81
From 441b3fd88149c03c0eb4ba373f3c6633df2f3196 Mon Sep 17 00:00:00 2001
cf4a81
From: Bhupesh Sharma <bhsharma@redhat.com>
cf4a81
Date: Fri, 29 Jun 2018 16:14:48 +0530
cf4a81
Subject: [PATCH] arm64: Fix calculation of page_offset in case we are running
cf4a81
 cases other than mem-usage
cf4a81
cf4a81
Patch f49ca13e5eed5bbdc69e0fd5ef099cb46050cb3d added '--mem-usage'
cf4a81
support for arm64 architecture.
cf4a81
cf4a81
However, we also need to make sure that the calculation of
cf4a81
'page_offset' is valid in case we are running cases other than
cf4a81
'--mem-usage'.
cf4a81
cf4a81
This patch does the same. I tested this patch on my qualcomm and apm
cf4a81
mustang arm64 boards.
cf4a81
cf4a81
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
cf4a81
---
cf4a81
 arch/arm64.c | 6 ++++++
cf4a81
 1 file changed, 6 insertions(+)
cf4a81
cf4a81
diff --git a/makedumpfile-1.6.2/arch/arm64.c b/makedumpfile-1.6.2/arch/arm64.c
cf4a81
index c9dab677f2c9..2fd3e1874376 100644
cf4a81
--- a/makedumpfile-1.6.2/arch/arm64.c
cf4a81
+++ b/makedumpfile-1.6.2/arch/arm64.c
cf4a81
@@ -222,6 +222,12 @@ get_stext_symbol(void)
cf4a81
 int
cf4a81
 get_machdep_info_arm64(void)
cf4a81
 {
cf4a81
+	/* Check if va_bits is still not initialized. If still 0, call
cf4a81
+	 * get_versiondep_info() to initialize the same.
cf4a81
+	 */
cf4a81
+	if (!va_bits)
cf4a81
+		get_versiondep_info_arm64();
cf4a81
+
cf4a81
 	if (!calculate_plat_config()) {
cf4a81
 		ERRMSG("Can't determine platform config values\n");
cf4a81
 		return FALSE;
cf4a81
-- 
cf4a81
2.7.4
cf4a81