From afb156a1eb217c5b7bdedddb75752c697cae381a Mon Sep 17 00:00:00 2001 From: Jaroslaw Stelter Date: Tue, 12 Jul 2022 10:53:18 +0200 Subject: [PATCH] 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 --- drivers/mm/mm_drv_intel_adsp_mtl_tlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mm/mm_drv_intel_adsp_mtl_tlb.c b/drivers/mm/mm_drv_intel_adsp_mtl_tlb.c index 66751242db5..5acf601694e 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 @@ static int sys_mm_drv_mm_init(const struct device *dev) } /* - * 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),