soc: ace_v1x: unmap entire unused virtual space
This patch corrects the initial unmapping of unused l2 memory
to unmap until the end of virtual address space instead
of unmapping until the end of l2 physical memory.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
diff --git a/drivers/mm/mm_drv_intel_adsp_mtl_tlb.c b/drivers/mm/mm_drv_intel_adsp_mtl_tlb.c
index 6675124..5acf601 100644
--- a/drivers/mm/mm_drv_intel_adsp_mtl_tlb.c
+++ b/drivers/mm/mm_drv_intel_adsp_mtl_tlb.c
@@ -681,9 +681,10 @@
}
/*
- * Unmap unused physical pages from the TLB to save power
+ * Unmap all unused physical pages from the entire
+ * virtual address space to save power
*/
- size_t unused_size = L2_SRAM_BASE + L2_SRAM_SIZE -
+ size_t unused_size = CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_SIZE -
unused_l2_start_aligned;
ret = sys_mm_drv_unmap_region(UINT_TO_POINTER(unused_l2_start_aligned),