mm_drv: tlb: Fix driver tests

Previous fix https://github.com/zephyrproject-rtos/zephyr/pull/58891
introduced failure in driver tests suite. This patch corrects the error
and reverts max_mapped_page field definition.
Adds max_mapped_pages stats reset after unmaping of unused memory.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
This commit is contained in:
Jaroslaw Stelter 2023-06-21 12:43:20 +02:00 committed by Anas Nashif
commit 225e8c09ac
3 changed files with 15 additions and 5 deletions

View file

@ -678,6 +678,11 @@ static int sys_mm_drv_mm_init(const struct device *dev)
ret = sys_mm_drv_unmap_region(UINT_TO_POINTER(UNUSED_L2_START_ALIGNED),
unused_size);
/* Need to reset max pages statistics after unmap */
for (int i = 0; i < L2_SRAM_BANK_NUM; i++) {
sys_mm_drv_bank_stats_reset_max(&hpsram_bank[i]);
}
#endif
/*