Skip to content

Commit

Permalink
mm/sparse: skip no-map memblock check when fill_subsection_map
Browse files Browse the repository at this point in the history
When mhp use sparse_add_section, don't check no-map region,
so that to allow no-map reserved memory to get struct page
support.

Signed-off-by: Li Chen <lchen@ambarella.com>
Change-Id: I0d2673cec1b66adf695251037a00c240976b226f
  • Loading branch information
FirstLoveLife authored and intel-lab-lkp committed Jul 11, 2022
1 parent 8b66b4b commit d9809d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/sparse.c
Expand Up @@ -692,7 +692,9 @@ static int fill_subsection_map(unsigned long pfn, unsigned long nr_pages)

if (bitmap_empty(map, SUBSECTIONS_PER_SECTION))
rc = -EINVAL;
else if (bitmap_intersects(map, subsection_map, SUBSECTIONS_PER_SECTION))
else if (memblock_is_map_memory(PFN_PHYS(pfn)) &&
bitmap_intersects(map, subsection_map,
SUBSECTIONS_PER_SECTION))
rc = -EEXIST;
else
bitmap_or(subsection_map, map, subsection_map,
Expand Down

0 comments on commit d9809d1

Please sign in to comment.