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

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