x86: mmu: don't decrement z_free_page_count in reserving code

In z_mem_manage_init(), z_free_page_count is only manipulated
after all reserved pages are marked, and will reflect
the actual number of page frames being added to the free page
frame list. Manipulating z_free_page_count before this is
going to mess up the accounting, so remove the code to
decrement z_free_page_count in arch_reserved_pages_update()
under x86.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-04-29 11:44:34 -07:00 committed by Anas Nashif
commit c481fd412e

View file

@ -1784,8 +1784,6 @@ static void mark_addr_page_reserved(uintptr_t addr, size_t len)
struct z_page_frame *pf = z_phys_to_page_frame(pos);
pf->flags |= Z_PAGE_FRAME_RESERVED;
z_free_page_count--;
}
}