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 committed Sep 20, 2024
1 parent b73c557 commit 675a73d
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 675a73d

Please sign in to comment.