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 <adrian.warecki@intel.com>
  • Loading branch information
softwarecki committed Sep 18, 2024
1 parent 418b1e0 commit cb2c3eb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/mm/mm_drv_intel_adsp_mtl_tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,15 @@ static int sys_mm_drv_unmap_region_initial(void *virt_in, size_t size)

for (offset = 0; offset < size; offset += CONFIG_MM_DRV_PAGE_SIZE) {
uint8_t *va = (uint8_t *)virt + offset;
uintptr_t unused;

int ret2 = sys_mm_drv_unmap_page_wflush(va, false);
int ret2 = sys_mm_drv_page_phys_get(va, &unused);
if (ret2) {

Check warning on line 493 in drivers/mm/mm_drv_intel_adsp_mtl_tlb.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LINE_SPACING

drivers/mm/mm_drv_intel_adsp_mtl_tlb.c:493 Missing a blank line after declarations
/* Skip unmapped pages */
continue;
}

ret2 = sys_mm_drv_unmap_page_wflush(va, false);

if (ret2 != 0) {
__ASSERT(false, "cannot unmap %p\n", va);
Expand Down

0 comments on commit cb2c3eb

Please sign in to comment.