Skip to content

Commit

Permalink
ace: mm: tlb: Ignore unmappig error in driver initalization
Browse files Browse the repository at this point in the history
The sys_mm_drv_unmap_region_initial function is responsible for unmapping
all unused virtual memory during tlb driver initialization. Most addresses
will not have a mapped page. Ignore the error code indicating unmapped
memory that will occur when trying to unmap.

Signed-off-by: Adrian Warecki <[email protected]>
  • Loading branch information
softwarecki authored and nashif committed Oct 15, 2024
1 parent 3be548b commit 0e9b9b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/mm/mm_drv_intel_adsp_mtl_tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,11 @@ static int sys_mm_drv_unmap_region_initial(void *virt_in, size_t size)

int ret2 = sys_mm_drv_unmap_page_wflush(va, false);

if (ret2 != 0) {
/* -EFAULT means that this page is not mapped.
* This is not an error since we want to unmap all virtual memory without knowing
* which pages are mapped.
*/
if (ret2 != 0 && ret2 != -EFAULT) {
__ASSERT(false, "cannot unmap %p\n", va);

ret = ret2;
Expand Down

0 comments on commit 0e9b9b0

Please sign in to comment.