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

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