Blame SOURCES/kexec-tools-2.0.20-makedumpfile-Increase-SECTION_MAP_LAST_BIT-to-4.patch

bda30f
From 7bdb468c2c99dd780c9a5321f93c79cbfdce2527 Mon Sep 17 00:00:00 2001
bda30f
From: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
bda30f
Date: Tue, 23 Jul 2019 12:24:47 -0400
bda30f
Subject: [PATCH] [PATCH] Increase SECTION_MAP_LAST_BIT to 4
bda30f
bda30f
kernel commit 326e1b8f83a4 ("mm/sparsemem: introduce a SECTION_IS_EARLY
bda30f
flag") added the flag to mem_section->section_mem_map value, and it caused
bda30f
makedumpfile an error like the following:
bda30f
bda30f
  readmem: Can't convert a virtual address(fffffc97d1000000) to physical address.
bda30f
  readmem: type_addr: 0, addr:fffffc97d1000000, size:32768
bda30f
  __exclude_unnecessary_pages: Can't read the buffer of struct page.
bda30f
  create_2nd_bitmap: Can't exclude unnecessary pages.
bda30f
bda30f
To fix this, SECTION_MAP_LAST_BIT needs to be updated. The bit has not
bda30f
been used until the addition, so we can just increase the value.
bda30f
bda30f
Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
bda30f
---
bda30f
 makedumpfile.h | 2 +-
bda30f
 1 file changed, 1 insertion(+), 1 deletion(-)
bda30f
bda30f
diff --git a/makedumpfile-1.6.6/makedumpfile.h b/makedumpfile-1.6.6/makedumpfile.h
bda30f
index 24b2f69f400c..df745b9f53e5 100644
bda30f
--- a/makedumpfile-1.6.6/makedumpfile.h
bda30f
+++ b/makedumpfile-1.6.6/makedumpfile.h
bda30f
@@ -195,7 +195,7 @@ isAnon(unsigned long mapping)
bda30f
  *  2. it has been verified that (1UL<<2) was never set, so it is
bda30f
  *     safe to mask that bit off even in old kernels.
bda30f
  */
bda30f
-#define SECTION_MAP_LAST_BIT	(1UL<<3)
bda30f
+#define SECTION_MAP_LAST_BIT	(1UL<<4)
bda30f
 #define SECTION_MAP_MASK	(~(SECTION_MAP_LAST_BIT-1))
bda30f
 #define NR_SECTION_ROOTS()	divideup(num_section, SECTIONS_PER_ROOT())
bda30f
 #define SECTION_NR_TO_PFN(sec)	((sec) << PFN_SECTION_SHIFT())
bda30f
-- 
bda30f
2.17.2
bda30f