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

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